Changeset 18 for trunk/Forms/UItemEdit.pas
- Timestamp:
- Jun 13, 2011, 2:41:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UItemEdit.pas
r15 r18 123 123 if Report.Count = 1 then 124 124 for I := 0 to Report.Columns.Count - 1 do 125 if TReportColumn(Report.Columns[I]).ColumnName <> 'Id'then begin125 if (TReportColumn(Report.Columns[I]).ColumnName <> 'Id') then begin 126 126 127 127 NewLabel := TLabel.Create(Panel1); … … 132 132 133 133 DataType := TReportColumn(Report.Columns[I]).CustomType; 134 NewControl := DataType.CreateControl(Panel1); 135 DataType.Load(TReportLine(Report[0]).Items[I]); 136 DataType.SetupControl(NewControl); 137 NewControl.Parent := Panel1; 138 NewControl.Top := LastTop; 139 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 140 NewControl.Width := (Width div ColumnCount) div 2 - 20; 141 ControlList.Add(NewControl); 134 if not (DataType is TDataTypeRelationMany) then begin 135 NewControl := DataType.CreateControl(Panel1); 136 DataType.Load(TReportLine(Report[0]).Items[I]); 137 DataType.SetupControl(NewControl); 138 NewControl.Parent := Panel1; 139 NewControl.Top := LastTop; 140 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 141 NewControl.Width := (Width div ColumnCount) div 2 - 20; 142 ControlList.Add(NewControl); 142 143 143 Column := (Column + 1) mod 2; 144 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 144 Column := (Column + 1) mod 2; 145 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 146 end; 145 147 end else ControlList.Add(nil); 146 148 end;
Note:
See TracChangeset
for help on using the changeset viewer.