This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

When I close a dockpanel on a docksite the panel count doesn't change

I am looping through a DockSite closing Tabbed Document panels but the Docksite's panel count doesn't change.
I am using DockSite.Panels[idx].Close to close each panel. 
Closing seems to work but my loop overruns because it is using PanelCount = 0 to terminate the loop.

Comments

  • Docking panel closing just hides it visually, because the panel can be showed again eventually, and it will reside in the same layout zone. 

    If you want to destroy panels one by one, you can explicitly destory then by calling Freee method, or you can set ACloseAction parameter to caFree value in panel's OnClose event handler. In later case, panels will be destroyed asynchronously, like forms.
Sign In or Register to comment.