Changeset 29 for trunk/Forms/UFormRecord.pas
- Timestamp:
- Sep 10, 2022, 10:54:56 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormRecord.pas
r28 r29 37 37 38 38 uses 39 UDataTypes ;39 UDataTypes, UCore; 40 40 41 41 {$R *.lfm} … … 86 86 const 87 87 LabelWidth = 300; 88 begin 88 var 89 LineHeight: Integer; 90 begin 91 LineHeight := Core.ScaleDPI1.ScaleY(35, Core.ScaleDPI1.DesignDPI.Y); 92 89 93 Row := DataRecord; 90 94 Controls.Clear; 91 95 Labels.Clear; 92 96 for I := 0 to Table.Fields.Count - 1 do begin 93 CellRect := Rect(10, 10 + I * 35, Panel1.Width - 20, (I + 1) * 35);97 CellRect := Rect(10, 10 + I * LineHeight, Panel1.Width - 20, (I + 1) * LineHeight); 94 98 NewLabel := TLabel.Create(Panel1); 95 NewLabel.Caption := T Field(Table.Fields[I]).TextBefore;99 NewLabel.Caption := Table.Fields[I].TextBefore; 96 100 NewLabel.Parent := Panel1; 97 101 NewLabel.Left := CellRect.Left; … … 99 103 NewLabel.Visible := True; 100 104 Labels.Add(NewLabel); 101 case T Field(Table.Fields[I]).DataType.FieldType of105 case Table.Fields[I].DataType.FieldType of 102 106 ftString: begin 103 107 NewControl := TEdit.Create(Panel1); … … 183 187 begin 184 188 for I := 0 to Table.Fields.Count - 1 do begin 185 case T Field(Table.Fields[I]).DataType.FieldType of189 case Table.Fields[I].DataType.FieldType of 186 190 ftString: TValueString(Row.Values[I]).Value := TEdit(Controls[I]).Text; 187 191 ftInteger: TValueInteger(Row.Values[I]).Value := TSpinEdit(Controls[I]).Value;
Note:
See TracChangeset
for help on using the changeset viewer.