-
Notifications
You must be signed in to change notification settings - Fork 274
Open
Labels
BugPull Requests InvitedThere are no current plans to address the issue, but we would be happy if someone supplies a PR.There are no current plans to address the issue, but we would be happy if someone supplies a PR.
Description
procedure TMyForm.vstStateChange(Sender: TBaseVirtualTree; Enter, Leave: TVirtualTreeStates);
var
SelectedCount: Integer;
begin
if tsChangePending in Leave then
begin
SelectedCount := 0;
for var Node in vst.SelectedNodes do
Inc(SelectedCount);
if SelectedCount <> vst.SelectedCount then
raise Exception.CreateFmt('counted=%d, vst=%d ', [SelectedCount, vst.SelectedCount]);
end;
end;
Of course, multiselect is active. The code above throws an exception when I reduce the number of selected Items with <cursor up/down>. In that case the vst.SelectedCount still holds the old number while the counted items (SelectedCount) is correct.
If I check vst.SelectedCount later, it seems to be correct again. However, I can't find any later event fired by the vst component to check the count and respond to it.
OnAddToSelection and OnRemoveFromSelection don't work either. Again, the vst.SelectedCount is wrong.
It would be great to have an "OnAfterSelect" event that fires when everything is ready...
Metadata
Metadata
Assignees
Labels
BugPull Requests InvitedThere are no current plans to address the issue, but we would be happy if someone supplies a PR.There are no current plans to address the issue, but we would be happy if someone supplies a PR.