TTreeView calls OnCollapsing and OnCollapsed during Control destruction and node clearing
Original Reporter info from Mantis: jamie @jamie
-
Reporter name: jamie philbrook
Original Reporter info from Mantis: jamie @jamie
- Reporter name: jamie philbrook
Description:
The TreeView is calling these events during destruction or clearing regardless of the expanded state.
if a tree is not expanded the events get called anyways and even if they were expanded they should not be getting called.
Delphi does not do this, when destroying the control these events are not called.
Steps to reproduce:
Drop a Treeview on the form. implement the OnCollapsed or OnCollapsing with some notification, for example a BEEP;
Free the control or just exit the app, you will get a beep and it does not matter if the tree is expanded or not..
During the events, you can test the NODE.Deleting and it is marked for deleting.
Should the events really get called at this time ?
I tested on Windows but I think it could also be happening on others too.