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

@ -994,7 +994,7 @@ begin
t.add(mask(DBRightClickSelectedItem.Parent.text) + '.' + mask(DBRightClickSelectedItem.text));
end else if PageControlMain.ActivePage = tabDatabase then begin
// Invoked from one of the various buttons, SheetDatabase is the active page, drop highlighted table(s).
t := GetSelectedNodesFromVT(ListTables);
t := GetVTCaptions(ListTables, True);
for i:=0 to t.count-1 do
begin
t[i] := mask(t[i]);