Changeset 28 for trunk/Forms/UFormRecord.pas
- Timestamp:
- Sep 10, 2022, 10:21:48 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormRecord.pas
r26 r28 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 7 ComCtrls, ActnList, StdCtrls, EditBtn, UDatabase, Contnrs, Spin;7 ComCtrls, ActnList, StdCtrls, EditBtn, UDatabase, Spin, Generics.Collections; 8 8 9 9 type … … 26 26 Table: TTable; 27 27 Row: TRecord; 28 Controls: TObjectList ; // TListObject<TControl>29 Labels: TObjectList ; // TListObject<TControl>28 Controls: TObjectList<TControl>; 29 Labels: TObjectList<TControl>; 30 30 procedure ReloadControls; 31 31 procedure Load(DataRecord: TRecord); … … 33 33 end; 34 34 35 var36 FormRecord: TFormRecord;37 35 38 36 implementation … … 43 41 {$R *.lfm} 44 42 43 resourcestring 44 STableRecordEdit = 'Table record edit'; 45 45 46 { TFormRecord } 46 47 47 48 procedure TFormRecord.FormShow(Sender: TObject); 48 49 begin 49 Caption := 'Table record edit- ' + Table.Caption;50 Caption := STableRecordEdit + ' - ' + Table.Caption; 50 51 ReloadControls; 51 52 end; … … 63 64 procedure TFormRecord.FormCreate(Sender: TObject); 64 65 begin 65 Controls := TObjectList .Create;66 Labels := TObjectList .Create;66 Controls := TObjectList<TControl>.Create; 67 Labels := TObjectList<TControl>.Create; 67 68 end; 68 69 69 70 procedure TFormRecord.FormDestroy(Sender: TObject); 70 71 begin 71 Labels.Free;72 Controls.Free;72 FreeAndNil(Labels); 73 FreeAndNil(Controls); 73 74 end; 74 75
Note:
See TracChangeset
for help on using the changeset viewer.