Marco Web Center |
|
Chapter 18 - Project ViewGrid |
Project Structure |
ViewGrid.dpr |
program ViewGrid; uses Forms, VGForm in 'VGForm.pas' {Form1}; {$R *.RES} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. |
VGForm.pas |
unit VGForm; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Db, DBTables, Grids, DBGrids, ExtCtrls, DBCtrls, MdRView; type TForm1 = class(TForm) MdRecordView1: TMdRecordView; DataSource1: TDataSource; Table1: TTable; DBNavigator1: TDBNavigator; private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} end. |
VGForm.dfm |
object Form1: TForm1 Left = 227 Top = 111 Width = 360 Height = 347 Caption = 'RecordView Component Demo' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = True PixelsPerInch = 96 TextHeight = 13 object MdRecordView1: TMdRecordView Left = 0 Top = 33 Width = 352 Height = 287 DataSource = DataSource1 Align = alClient Ctl3D = True DefaultColWidth = 120 DefaultRowHeight = 28 ParentCtl3D = False TabOrder = 0 end object DBNavigator1: TDBNavigator Left = 0 Top = 0 Width = 352 Height = 33 DataSource = DataSource1 Align = alTop TabOrder = 1 end object DataSource1: TDataSource DataSet = Table1 Left = 48 Top = 40 end object Table1: TTable Active = True DatabaseName = 'DBDEMOS' TableName = 'BIOLIFE.DB' Left = 48 Top = 96 end end |