Docking Pane Caption with [X] button |
Post Reply |
Author | |
MacW
Senior Member Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Posted: 06 August 2011 at 9:44am |
Hi,
is it possible to have a close button [x] on the caption of auto-hide panes? Similar to CXTPTabCtrl's ShowCloseItemButton(xtpTabNavigateButtonAutomatic); |
|
MacW
Senior Member Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
|
Or add some code to close them when I click on the tab?
|
|
Carlos Rocha
Groupie Joined: 11 February 2008 Location: Portugal Status: Offline Points: 92 |
Post Options
Thanks(0)
|
I get PaneActionFloating when clicking in a pane title bar (ActiveX version). I use it to maximize the pane, but maybe it works for what you want.
|
|
SuitePro 20.3.0
OS: Windows 10 Language: Visual Objects 2.8 |
|
MacW
Senior Member Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
|
Thanks, Carlos
but this will not work in my case. When the user expands an auto-hide pane, my app gets the standard actions (expanding, expanded, activated...) Good. But clicking on the tab (not the caption/title bar!) does not cause any event or action. My users want to be able to hide the pane by clicking on the tab. When an auto-hide pane does not get the focus when the user opens it, it will automatically hide when the user moves the mouse out of the pane. If the pane grabs the focus or the user sets the focus to the pane by clicking the pane itself or the child window, the pane will no longer auto-close when the mouse leaves the pane. The user has to explicitly set the focus to another window to make the pane close. The mouse click is handled in CXTPDockingPaneAutoHidePanel::OnLButtonDown but there are no virtual functions or notifications to intercept or use. Adding the ability to hide the pane by clicking the tab would require source code changes in XTP. |
|
cluster
Groupie Joined: 22 January 2015 Status: Offline Points: 91 |
Post Options
Thanks(0)
|
Hi, I need this functionality also, do you already found a solution in the meantime? THX EDIT: Btw. Visual Studio 2013 has this feature as well
|
|
Windows 7
Visual Studio 2013 CodeJock 18.6 |
|
cluster
Groupie Joined: 22 January 2015 Status: Offline Points: 91 |
Post Options
Thanks(0)
|
Ok I have found a solution which give me the Visual Studio 2013 behavior. First step is, to disable the hover functionality with SetDefaultPaneOptions( xtpPaneNoHoverShow ); Next step is to use a class derivation of CXTPDockingPaneAutoHidePanel and handle the OnLButtonDown function like: void CDockingPaneAutoHidePanel::OnLButtonDown(UINT /*nFlags*/, CPoint point) { if (m_pHighlightedNavigateButton) { m_pHighlightedNavigateButton->PerformClick(m_hWnd, point); return; } CXTPDockingPane* pPane = HitTest(point); if (pPane) { if (pPane->IsFocus()) { pPane->Hide(); SetFocus(); } else { ShowPane(pPane, TRUE); } } } |
|
Windows 7
Visual Studio 2013 CodeJock 18.6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |