Changeset 22 for trunk/USystem.pas


Ignore:
Timestamp:
Jun 16, 2011, 12:18:21 PM (13 years ago)
Author:
george
Message:
  • Modified: Optimalized reloading of columns list in item list.
  • Fixed: Add and modify function.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/USystem.pas

    r21 r22  
    77uses
    88  Classes, SysUtils, SpecializedList, SpecializedDictionary, USqlDatabase,
    9   Strings, UDataTypes, Dialogs, ComCtrls, StdCtrls;
     9  Strings, UDataTypes, Dialogs, ComCtrls, StdCtrls, Controls;
    1010
    1111const
     
    5151    ColumnName: string;
    5252    VirtualItem: Boolean;
     53    Control: TWinControl;
    5354  end;
    5455
     
    597598  NewColumn: TListColumn;
    598599begin
    599   AColumns.Clear;
     600  while (AColumns.Count < Columns.Count) do
     601    AColumns.Add;
     602  while (AColumns.Count > Columns.Count) do
     603    AColumns.Delete(AColumns.Count - 1);
    600604  for I := 0 to Columns.Count - 1 do
    601605  if not TReportColumn(Columns[I]).VirtualItem then begin
    602     NewColumn := AColumns.Add;
    603     NewColumn.Caption := TReportColumn(Columns[I]).Caption;
     606    AColumns[I].Caption := TReportColumn(Columns[I]).Caption;
    604607  end;
    605608end;
Note: See TracChangeset for help on using the changeset viewer.