Changeset 321
- Timestamp:
- Jun 25, 2024, 1:00:56 AM (5 months ago)
- Location:
- trunk/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormItem.lfm
r317 r321 1 1 object FormItem: TFormItem 2 2 Left = 1040 3 Height = 3 603 Height = 397 4 4 Top = 540 5 Width = 4 805 Width = 469 6 6 Caption = 'Item' 7 ClientHeight = 3 608 ClientWidth = 4 807 ClientHeight = 397 8 ClientWidth = 469 9 9 DesignTimePPI = 144 10 10 OnCreate = FormCreate … … 12 12 LCLVersion = '3.4.0.0' 13 13 object ButtonOk: TButton 14 Left = 8914 Left = 344 15 15 Height = 38 16 Top = 3 1216 Top = 353 17 17 Width = 113 18 Anchors = [ak Left, akBottom]18 Anchors = [akRight, akBottom] 19 19 Caption = 'OK' 20 20 ModalResult = 1 … … 24 24 end 25 25 object ButtonCancel: TButton 26 Left = 2 6426 Left = 208 27 27 Height = 38 28 Top = 3 1228 Top = 353 29 29 Width = 113 30 Anchors = [ak Left, akBottom]30 Anchors = [akRight, akBottom] 31 31 Caption = 'Cancel' 32 32 ModalResult = 2 … … 34 34 TabOrder = 1 35 35 end 36 object ScrollBox1: TScrollBox 37 Left = 8 38 Height = 334 39 Top = 8 40 Width = 453 41 HorzScrollBar.Page = 1 42 VertScrollBar.Page = 1 43 Anchors = [akTop, akLeft, akRight, akBottom] 44 TabOrder = 2 45 end 36 46 end -
trunk/Forms/FormItem.pas
r318 r321 14 14 ButtonOk: TButton; 15 15 ButtonCancel: TButton; 16 ScrollBox1: TScrollBox; 16 17 procedure ButtonOkClick(Sender: TObject); 17 18 procedure FormCreate(Sender: TObject); … … 84 85 Fields := Item.GetFields; 85 86 for I := 0 to Fields.Count - 1 do 86 with TItemField(Fields[I])do begin87 with Fields[I] do begin 87 88 Control := DataControls[I]; 88 89 if DataType = dtInteger then TSpinEdit(Control).Value := Item.GetValueInteger(Index) … … 129 130 Fields := Item.GetFields; 130 131 for I := 0 to Fields.Count - 1 do 131 with TItemField(Fields[I])do begin132 with Fields[I] do begin 132 133 Control := DataControls[I]; 133 134 if DataType = dtInteger then Item.SetValueInteger(Index, TSpinEdit(Control).Value) … … 159 160 Fields := Item.GetFields; 160 161 for I := 0 to Fields.Count - 1 do 161 with TItemField(Fields[I])do begin162 NewLabel := TLabel.Create(S elf);162 with Fields[I] do begin 163 NewLabel := TLabel.Create(ScrollBox1); 163 164 NewLabel.Left := Scale96ToScreen(8); 164 165 NewLabel.Top := Y; 165 NewLabel.Parent := S elf;166 NewLabel.Parent := ScrollBox1; 166 167 NewLabel.Caption := Name + ':'; 167 168 NewLabel.Visible := True; … … 200 201 NewControl.Left := Scale96ToScreen(150); 201 202 NewControl.Top := Y; 202 NewControl.Parent := S elf;203 NewControl.Parent := ScrollBox1; 203 204 TFormEx.Translator.TranslateComponent(NewControl); 204 205 TFormEx.ThemeManager.ApplyTheme(NewControl); … … 219 220 try 220 221 for I := 0 to Fields.Count - 1 do 221 with TItemField(Fields[I])do begin222 with Fields[I] do begin 222 223 if VisibleIfIndex > 0 then begin 223 if TItemField(Fields[VisibleIfIndex]).DataType = dtEnumeration then begin224 if Fields[VisibleIfIndex].DataType = dtEnumeration then begin 224 225 Condition := TComboBox(DataControls[VisibleIfIndex]).ItemIndex > 0; 225 226 end else Condition := False;
Note:
See TracChangeset
for help on using the changeset viewer.