home *** CD-ROM | disk | FTP | other *** search
- unit Ffactwin;
- {This application shows how to display Paradox style memo and graphic
- fields in a form. Table1's DatabaseName property should point to the
- Delphi sample database, normally \DELPHI\DEMOS\DATABASE. Table1's
- TableName property should be set to the BIOLIFE table. See accompanying
- FISHFACT.TXT for more information about this demo application}
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, StdCtrls, DBCtrls, DBGrids, DB, DBTables, Buttons, Grids, ExtCtrls,
- DBFltCom, DataSorc;
-
- type
- TForm1 = class(TForm)
- Panel1: TPanel;
- Label1: TLabel;
- DBImage1: TDBImage;
- DBLabel1: TDBText;
- DBMemo1: TDBMemo;
- DataSource1: TDataSource;
- Table1: TTable;
- Table1Common_Name: TStringField;
- Table1Graphic: TBlobField;
- DBGrid1: TDBGrid;
- BitBtn1: TBitBtn;
- Table1Category: TStringField;
- Table1SpeciesName: TStringField;
- Table1Lengthcm: TFloatField;
- Table1Length_In: TFloatField;
- Table1Notes: TMemoField;
- Table1Edible: TIntegerField;
- Table1Habits: TIntegerField;
- Table1Temperature: TIntegerField;
- HelperSource: TDataSource;
- HelperTable: TTable;
- Edible: TDBFilterCombo;
- Temperature: TDBFilterCombo;
- Habits: TDBFilterCombo;
- Label4: TLabel;
- Label5: TLabel;
- Label3: TLabel;
- Label2: TLabel;
- Label7: TLabel;
- HelperTableDescription: TStringField;
- HelperTableCounter: TIntegerField;
- HelperTableType: TStringField;
- procedure HabitsNewLookupRecord(Sender: TObject;
- var Cancelled: Boolean);
-
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.HabitsNewLookupRecord(Sender: TObject; var Cancelled: Boolean);
- begin
- Cancelled := False;
- If UpperCase(TDBFilterCombo(Sender).Text) = 'FRED' then
- begin
- MessageBox(Handle, 'You cant type FRED here', 'DBFilterCombo Sample', MB_OK);
- TDBFilterCombo(Sender).SetFocus;
- Cancelled := True;
- end;
- end;
-
- end.
-