Switch ListColumns from TSortListView to TVirtualStringTree

Additionally/Sideeffects:
- Fix vstFreeNode to delete the item from the array, not only free the item itself
- Change/Rename GetSelectedNodesFromVT to GetVTCaptions and give it the ability to return all captions, not only the selected. This function is very useful now and saves writing much redundant code.

A table with 500 columns needed 3 seconds to display in the TSortListView, now that takes less than a half second.
This commit is contained in:
Ansgar Becker
2007-08-27 00:01:53 +00:00
parent 1fa1837ec8
commit 3f0b70c409
10 changed files with 233 additions and 185 deletions

View File

@ -49,7 +49,7 @@ const
implementation
uses main;
uses main, helpers;
{$R *.dfm}
@ -64,11 +64,7 @@ var
reg : TRegistry;
begin
// Take column names from listColumns and add here
ColumnNames := TStringList.Create;
for i := 0 to Mainform.Childwin.listColumns.Items.Count-1 do
begin
ColumnNames.Add( Mainform.Childwin.listColumns.Items[i].Caption );
end;
ColumnNames := GetVTCaptions( Mainform.Childwin.ListColumns );
// Read original ORDER clause from registry
reg := TRegistry.Create();