Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

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.
Tagged:

Comments

  • 1 Comment sorted by Votes Date Added
  • 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.