Changeset 317 for trunk/Forms/FormItem.pas
- Timestamp:
- Jun 21, 2024, 12:44:53 PM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormItem.pas
r316 r317 1 unit UFormItem;1 unit FormItem; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, UItemList,7 ExtCtrls, ColorBox, Spin, Generics.Collections ;6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ItemList, 7 ExtCtrls, ColorBox, Spin, Generics.Collections, FormEx; 8 8 9 9 type … … 11 11 { TFormItem } 12 12 13 TFormItem = class(TForm )13 TFormItem = class(TFormEx) 14 14 ButtonOk: TButton; 15 15 ButtonCancel: TButton; 16 16 procedure ButtonOkClick(Sender: TObject); 17 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);18 17 procedure FormCreate(Sender: TObject); 19 18 procedure FormDestroy(Sender: TObject); 20 procedure FormShow(Sender: TObject);21 19 private 22 20 FItem: TItem; … … 33 31 end; 34 32 35 var36 FormItem: TFormItem;37 38 33 39 34 implementation … … 42 37 43 38 uses 44 UCore;39 Core; 45 40 46 41 { TFormItem } … … 51 46 end; 52 47 53 procedure TFormItem.FormClose(Sender: TObject; var CloseAction: TCloseAction);54 begin55 Core.PersistentForm.Save(Self);56 end;57 58 48 procedure TFormItem.FormCreate(Sender: TObject); 59 49 begin 60 Core.CoolTranslator1.TranslateComponentRecursive(Self);61 Core.ThemeManager1.UseTheme(Self);62 50 DataControls := TObjectList<TControl>.Create; 63 51 DataLabels := TObjectList<TLabel>.Create; … … 66 54 procedure TFormItem.FormDestroy(Sender: TObject); 67 55 begin 68 DataLabels.Free; 69 DataControls.Free; 70 end; 71 72 procedure TFormItem.FormShow(Sender: TObject); 73 begin 74 Core.PersistentForm.Load(Self); 56 FreeAndNil(DataLabels); 57 FreeAndNil(DataControls); 75 58 end; 76 59 … … 221 204 NewControl.Top := Y; 222 205 NewControl.Parent := Self; 223 Core.Co olTranslator1.TranslateComponent(NewControl);224 Core. ThemeManager1.ApplyTheme(NewControl);206 Core.Core.Translator1.TranslateComponent(NewControl); 207 Core.Core.ThemeManager1.ApplyTheme(NewControl); 225 208 NewControl.Visible := True; 226 209 DataControls.Add(NewControl);
Note:
See TracChangeset
for help on using the changeset viewer.