home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programming Unleashed / Delphi_Programming_Unleashed_SAMS_Publishing_1995.iso / chap20 / ranger / main.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-03-21  |  864 b   |  47 lines

  1. unit Main;
  2.  
  3. { Program copyright (c) 1994 by Charles Calvert }
  4. { Project Name: RANGER }
  5.  
  6. interface
  7.  
  8. uses 
  9.   WinTypes, WinProcs, Classes, 
  10.   Graphics, Forms, Controls, 
  11.   DB, DBGrids, DBTables, StdCtrls, Grids;
  12.  
  13. type
  14.   TForm1 = class(TForm)
  15.     Table1: TTable;
  16.     DataSource1: TDataSource;
  17.     DBGrid1: TDBGrid;
  18.     Edit1: TEdit;
  19.     bApplyRange: TButton;
  20.     Edit2: TEdit;
  21.     Label1: TLabel;
  22.     Label2: TLabel;
  23.     procedure bApplyRangeClick(Sender: TObject);
  24.   private
  25.     { Private declarations }
  26.   public
  27.     { Public declarations }
  28.   end;
  29.  
  30. var
  31.   Form1: TForm1;
  32.  
  33. implementation
  34.  
  35. {$R *.DFM}
  36.  
  37. procedure TForm1.bApplyRangeClick(Sender: TObject);
  38. begin
  39.   Table1.SetRangeStart;
  40.   Table1.Fields[0].AsString := Edit1.Text;
  41.   Table1.SetRangeEnd;
  42.   Table1.Fields[0].AsString := Edit2.Text;
  43.   Table1.ApplyRange;
  44. end;
  45.  
  46. end.
  47.