Changeset 15 for trunk/Forms/UFormRecords.pas
- Timestamp:
- Mar 22, 2018, 8:31:19 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormRecords.pas
r13 r15 145 145 var 146 146 I: Integer; 147 NewColumn: TListColumn;148 147 begin 149 148 Table.LoadRecords; 150 ListView1.Columns.Clear; 149 150 ListView1.Columns.BeginUpdate; 151 while ListView1.Columns.Count > Table.Fields.Count do 152 ListView1.Columns[ListView1.ColumnCount - 1].Free; 153 while ListView1.Columns.Count < Table.Fields.Count do 154 ListView1.Columns.Add; 151 155 for I := 0 to Table.Fields.Count - 1 do begin 152 NewColumn := ListView1.Columns.Add; 153 NewColumn.Caption := TField(Table.Fields[I]).TextBefore; 154 NewColumn.Width := 200; 156 ListView1.Columns[I].Caption := TField(Table.Fields[I]).TextBefore; 157 ListView1.Columns[I].Width := 200; 155 158 end; 159 ListView1.Columns.EndUpdate; 156 160 157 161 ListView1.Items.Count := Table.Records.Count;
Note:
See TracChangeset
for help on using the changeset viewer.