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.

Is there an event that fires when clicking the close button on a docked control

For  'useability' i hav a dock panel that autodocks various forms when a button is pressed - it fires  splotter 'opensplitter'  to reval the docked control(s).
Correspondingly by clicking the button again it undocks and closes the docked control - when the docked panel count gets to 0 the splitter closesplitter is executed to hide the empty dockpanel - all works perfectly in my scenariio (show the dockpanel, dock a control, if undocking and control empty - hide the panel)

However, if  the user clicks the close icon on the docked control - the docked control closes - but the panelcount does not decrement - such that when all the docked controls are closed in this manner there doesn't seem to be a reliable way of checking that nothing is docked and hence firing the closesplitter to hide the empty dockpanel.

Manually undocking the control works fine (by dragging with the mouse)  - control undocks and the panelcount is decremented
Using a buttton to undock works ok as well.

so - is there an event that fires when the close button is pressed on a docked control and that decrements the panelcount.?
or - is there an event that fires on close tab of the dockpanel ? both of which decrement the docked panel count (to 0 if nothing is docked)
NB - all docking controls are forms

Comments

  • PanelCount will not be decremented because all panels are still on their corresponding places, but hidden. You can call Show method subsequently to show a panel again.

    TLMDDockPanel control provides OnClose and OnCloseQuery events, which can be used to prevent panel closing or to execute some custom action.
Sign In or Register to comment.