MultiRec.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit MultiRec;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, Mask, DBCtrls, DBTables, DB, ComCtrls, ExtCtrls, DBCGrids;
- type
- TForm1 = class(TForm)
- DBCtrlGrid1: TDBCtrlGrid;
- Table1: TTable;
- DataSource1: TDataSource;
- Table1Name: TStringField;
- Table1Capital: TStringField;
- Table1Continent: TStringField;
- Table1Area: TFloatField;
- Table1Population: TFloatField;
- DBEdit1: TDBEdit;
- DBEdit2: TDBEdit;
- Label1: TLabel;
- Label2: TLabel;
- Panel1: TPanel;
- TrackBar1: TTrackBar;
- LabelCols: TLabel;
- procedure TrackBar1Change(Sender: TObject);
- procedure FormResize(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.DFM}
- procedure TForm1.TrackBar1Change(Sender: TObject);
- begin
- LabelCols.Caption := Format (
- '%d Columns', [TrackBar1.Position]);
- DBCtrlGrid1.ColCount := TrackBar1.Position;
- DBCtrlGrid1.Width := ClientWidth;
- end;
- procedure TForm1.FormResize(Sender: TObject);
- begin
- DBCtrlGrid1.RowCount :=
- (ClientHeight - Panel1.Height) div 100;
- DBCtrlGrid1.Height := ClientHeight - Panel1.Height;
- DBCtrlGrid1.Width := ClientWidth;
- end;
- end.