Logo Delphi Handbooks Collection

Delphi Developer Days 2012
March-May
Cantù-Jensen
(UK, NL, US, D, I)

Menu for Development

Site Menu
Delphi 2010 Handbook
Delphi 2009 Handbook
Delphi 2007 Handbook
Mastering Borland Delphi 2005
Essential Pascal
Essential Delphi
Buy Books Online
Code Repository
Newsgroups
White Papers
Tools
Conferences
Training
Delphi Links
Contact Marco

My Other Sites
Italian Site (www.marcocantu.it)
Developers Newsgroups Browser (dev.newswhat.com)
My town (www.piazzacavalli.net)
the delphi search
Wintech Italia (my company)

Advertising
Home My Blog Handbooks Development Links Marco
Delphi Developer Days 2012


Home: Code Repository: Mastering Delphi 6

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