save TListBox.ItemIndex on destroy handle

git-svn-id: trunk@6491 -
This commit is contained in:
mattias 2005-01-07 02:23:58 +00:00
parent 36c907fc59
commit 563264d9fa

View File

@ -100,6 +100,9 @@ var
i, Cnt: integer;
begin
LockSelectionChange;
// save ItemIndex on destroy handle
if ([csDestroying,csLoading]*ComponentState=[]) then
GetItemIndex;
//DebugLn('[TCustomListBox.DestroyHandle] A ',FItems.ClassName);
// create internal item list
NewStrings:= TExtendedStringList.Create(GetCachedDataSize);