PageRenderTime 31ms CodeModel.GetById 16ms app.highlight 11ms RepoModel.GetById 2ms app.codeStats 0ms

/components/paradox/demo/frmmain.pp

http://github.com/graemeg/lazarus
Pascal | 47 lines | 28 code | 13 blank | 6 comment | 0 complexity | 985240a6056b3541bd8fffb0a227421f MD5 | raw file
 1unit frmmain;
 2
 3{$mode objfpc}{$H+}
 4
 5interface
 6
 7uses
 8  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, EditBtn,
 9  StdCtrls, DbCtrls, DBGrids, db, paradox, ExtCtrls;
10
11type
12
13  { TMainForm }
14
15  TMainForm = class(TForm)
16    Button1: TButton;
17    DSPDX: TDatasource;
18    DBGrid1: TDBGrid;
19    DBNavigator1: TDBNavigator;
20    FEPX: TFileNameEdit;
21    Label1: TLabel;
22    PDX: TParadox;
23    procedure Button1Click(Sender: TObject);
24  private
25    { private declarations }
26  public
27    { public declarations }
28  end;
29
30var
31  MainForm: TMainForm;
32
33implementation
34
35{$R frmmain.lfm}
36
37{ TMainForm }
38
39procedure TMainForm.Button1Click(Sender: TObject);
40begin
41  PDX.Close;
42  PDX.FileName:=FEPX.FileName;
43  PDX.Open;
44end;
45
46end.
47