Print Page | Close Window

Click on a tab of a pane event

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3146
Printed Date: 14 July 2025 at 1:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Click on a tab of a pane event
Posted By: yoavo
Subject: Click on a tab of a pane event
Date Posted: 03 November 2005 at 7:36am

Hi,

Is there a way to handle the event of clicking a tab item of a pane (in AutoHide mode) ?

Yoav.




Replies:
Posted By: Oleg
Date Posted: 04 November 2005 at 12:05am

Here are some hints:

1. Override CXTPDockingPaneManager and its OnCreatePane:

class CDockingPaneManager : public CXTPDockingPaneManager
{
public:
 CDockingPaneManager();
 virtual ~CDockingPaneManager();

protected:
 virtual CXTPDockingPaneBase* OnCreatePane(XTPDockingPaneType type, CXTPDockingPaneLayout* pLayout);

};

 

2. if type == xtpPaneTypeAutoHidePanel return custom derived CXTPDockingPaneAutoHidePanel class.

3. catch  in csutom CDockingPaneAutoHidePanel its OnLButtonDown

void CDockingPaneAutoHidePanel::OnLButtonDown(UINT /*nFlags*/, CPoint point)
{
 CXTPDockingPane* pPane = HitTest(point);
 if (pPane)
 {
  if (m_pActiveWnd && m_pActiveWnd->m_pPane->GetSelected() == pPane)
  {
   pPane->SetFocus();

  } else
  {
   CloseActiveWindow();
   GetDockingPaneManager()->ShowPane(pPane );
  }
 }
}

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: yoavo
Date Posted: 06 November 2005 at 7:33am

Hi Oleg,

I tried to follow your instructions, but I have problem in deriving from CXTPDockingPaneAutoHidePanel because its CTOR is private.

Can you advise ?

Yoav.



Posted By: Oleg
Date Posted: 07 November 2005 at 2:18am

I think you have quite old ToolkitPro version. In last versions it was protected.

Change your sources to make it protected and rebuild library



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net