Changeset 5
- Timestamp:
- Jan 18, 2015, 11:41:05 PM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormField.lfm
r3 r5 9 9 OnCreate = FormCreate 10 10 OnShow = FormShow 11 Position = poMainFormCenter 11 12 LCLVersion = '1.3' 12 13 object EditName: TEdit … … 98 99 Top = 184 99 100 Width = 936 100 ActivePage = TabSheet DateTime101 ActivePage = TabSheetFloat 101 102 Anchors = [akTop, akLeft, akRight, akBottom] 102 103 ShowTabs = False 103 TabIndex = 2104 TabIndex = 4 104 105 TabOrder = 6 105 106 object TabSheetString: TTabSheet … … 125 126 object TabSheetInteger: TTabSheet 126 127 Caption = 'TabSheetInteger' 128 ClientHeight = 194 129 ClientWidth = 930 130 object Label10: TLabel 131 Left = 12 132 Height = 25 133 Top = 21 134 Width = 96 135 Caption = 'Minimum:' 136 ParentColor = False 137 end 138 object SpinEditMin: TSpinEdit 139 Left = 153 140 Height = 35 141 Top = 19 142 Width = 255 143 MaxValue = 10000000 144 TabOrder = 0 145 end 146 object SpinEditMax: TSpinEdit 147 Left = 153 148 Height = 35 149 Top = 56 150 Width = 255 151 TabOrder = 1 152 end 153 object Label11: TLabel 154 Left = 12 155 Height = 25 156 Top = 58 157 Width = 100 158 Caption = 'Maximum:' 159 ParentColor = False 160 end 127 161 end 128 162 object TabSheetDateTime: TTabSheet … … 178 212 Caption = 'TabSheetBoolean' 179 213 end 214 object TabSheetFloat: TTabSheet 215 Caption = 'TabSheetFloat' 216 ClientHeight = 194 217 ClientWidth = 930 218 object FloatSpinEditMin: TFloatSpinEdit 219 Left = 144 220 Height = 35 221 Top = 16 222 Width = 266 223 Increment = 1 224 MaxValue = 100000000 225 MinValue = 0 226 TabOrder = 0 227 Value = 0 228 end 229 object Label8: TLabel 230 Left = 8 231 Height = 25 232 Top = 25 233 Width = 96 234 Caption = 'Minimum:' 235 ParentColor = False 236 end 237 object FloatSpinEditMax: TFloatSpinEdit 238 Left = 144 239 Height = 35 240 Top = 64 241 Width = 266 242 Increment = 1 243 MaxValue = 100 244 MinValue = 0 245 TabOrder = 1 246 Value = 0 247 end 248 object Label9: TLabel 249 Left = 8 250 Height = 25 251 Top = 73 252 Width = 100 253 Caption = 'Maximum:' 254 ParentColor = False 255 end 256 end 180 257 end 181 258 end -
trunk/Forms/UFormField.pas
r4 r5 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, EditBtn, UDatabase;9 ComCtrls, EditBtn, Spin, UDatabase; 10 10 11 11 type … … 23 23 EditTextBefore: TEdit; 24 24 EditTextAfter: TEdit; 25 FloatSpinEditMin: TFloatSpinEdit; 26 FloatSpinEditMax: TFloatSpinEdit; 25 27 Label1: TLabel; 28 Label10: TLabel; 29 Label11: TLabel; 26 30 Label2: TLabel; 27 31 Label3: TLabel; … … 30 34 Label6: TLabel; 31 35 Label7: TLabel; 36 Label8: TLabel; 37 Label9: TLabel; 32 38 PageControl1: TPageControl; 39 SpinEditMin: TSpinEdit; 40 SpinEditMax: TSpinEdit; 41 TabSheetFloat: TTabSheet; 33 42 TabSheetDateTime: TTabSheet; 34 43 TabSheetInteger: TTabSheet; … … 88 97 DateEditMax.Date := TFieldDateTime(Field.TypeRelated).Max; 89 98 end; 99 if Field.FieldType = ftInteger then begin 100 SpinEditMin.Value := TFieldInteger(Field.TypeRelated).Min; 101 SpinEditMax.Value := TFieldInteger(Field.TypeRelated).Max; 102 end; 103 if Field.FieldType = ftFloat then begin 104 FloatSpinEditMin.Value := TFieldFloat(Field.TypeRelated).Min; 105 FloatSpinEditMax.Value := TFieldFloat(Field.TypeRelated).Max; 106 end; 90 107 end; 91 108 … … 102 119 TFieldDateTime(Field.TypeRelated).Max := DateEditMax.Date; 103 120 end; 121 if Field.FieldType = ftInteger then begin 122 TFieldInteger(Field.TypeRelated).Min := SpinEditMin.Value; 123 TFieldInteger(Field.TypeRelated).Max := SpinEditMax.Value; 124 end; 125 if Field.FieldType = ftFloat then begin 126 TFieldFloat(Field.TypeRelated).Min := FloatSpinEditMin.Value; 127 TFieldFloat(Field.TypeRelated).Max := FloatSpinEditMax.Value; 128 end; 104 129 end; 105 130 -
trunk/Forms/UFormFields.lfm
r4 r5 8 8 ClientWidth = 940 9 9 OnShow = FormShow 10 Position = poMainFormCenter 10 11 LCLVersion = '1.3' 11 12 object ToolBar1: TToolBar -
trunk/Forms/UFormRecord.lfm
r4 r5 10 10 OnDestroy = FormDestroy 11 11 OnShow = FormShow 12 Position = poMainFormCenter 12 13 LCLVersion = '1.3' 13 14 object Panel1: TPanel -
trunk/Forms/UFormRecord.pas
r4 r5 141 141 Controls.Add(NewControl); 142 142 end; 143 ftFloat: begin 144 NewControl := TFloatSpinEdit.Create(Panel1); 145 NewControl.Parent := Panel1; 146 NewControl.Left := CellRect.Left; 147 NewControl.Top := CellRect.Top + NewLabel.Height + 6; 148 NewControl.Width := CellRect.Right - CellRect.Left; 149 NewControl.Visible := True; 150 TFloatSpinEdit(NewControl).Value := TValueFloat(Row.Values[I]).Value; 151 Controls.Add(NewControl); 152 end; 143 153 end; 144 154 end; … … 155 165 ftDateTime: TValueDateTime(Row.Values[I]).Value := TDateEdit(Controls[I]).Date; 156 166 ftBoolean: TValueBoolean(Row.Values[I]).Value := TCheckBox(Controls[I]).Checked; 167 ftFloat: TValueFloat(Row.Values[I]).Value := TFloatSpinEdit(Controls[I]).Value; 157 168 end; 158 169 end; -
trunk/Forms/UFormRecords.lfm
r4 r5 8 8 ClientWidth = 859 9 9 OnShow = FormShow 10 Position = poMainFormCenter 10 11 LCLVersion = '1.3' 11 12 object ListView1: TListView -
trunk/Forms/UFormTable.lfm
r4 r5 7 7 ClientHeight = 351 8 8 ClientWidth = 725 9 Position = poMainFormCenter 9 10 LCLVersion = '1.3' 10 11 object EditName: TEdit
Note:
See TracChangeset
for help on using the changeset viewer.