home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 48 / SENT14D.ISO / tech / delphi / disk15 / dbaware2.pak / MAIN.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1995-08-24  |  1.1 KB  |  45 lines

  1. { Demos the use of TDBLookupCombo and TDBLookupList. DBLookupCombo1
  2.   presents a pick list of customer numbers from the customer
  3.   table. Both DBLookupList and DBLookupCombo2 use the LookupDisplay
  4.   property to convert customer numbers to company names in
  5.   their pick lists. }
  6. unit Main;
  7.  
  8. interface
  9.  
  10. uses
  11.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  12.   Forms, DBGrids, DB, DBTables, StdCtrls, Grids, DBLookup, ExtCtrls;
  13.  
  14. type
  15.   TForm1 = class(TForm)
  16.     Panel1: TPanel;
  17.     DBLookupCombo1: TDBLookupCombo;
  18.     DBLookupCombo2: TDBLookupCombo;
  19.     Label1: TLabel;
  20.     Label2: TLabel;
  21.     DBLookupList2: TDBLookupList;
  22.     Orders: TTable;
  23.     OrdersSource: TDataSource;
  24.     DBGrid1: TDBGrid;
  25.     OrdersOrderNo: TFloatField;
  26.     OrdersCustNo: TFloatField;
  27.     OrdersItemsTotal: TCurrencyField;
  28.     Cust: TTable;
  29.     CustSource: TDataSource;
  30.     OrdersPaymentMethod: TStringField;
  31.   private
  32.     { Private declarations }
  33.   public
  34.     { Public declarations }
  35.   end;
  36.  
  37. var
  38.   Form1: TForm1;
  39.  
  40. implementation
  41.  
  42. {$R *.DFM}
  43.  
  44. end.
  45.