Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Tab Item Screen Rect
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tab Item Screen Rect

 Post Reply Post Reply
Author
Message
alpine35 View Drop Down
Newbie
Newbie


Joined: 17 July 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote alpine35 Quote  Post ReplyReply Direct Link To This Post Topic: Tab Item Screen Rect
    Posted: 17 July 2007 at 3:31pm
Hello,

For docking panes, is it possible to get the individual tab item screen rectangle? I need the item screen rectangle or more precise, an anchor point in order to popup a balloon help next to tab item in certain situations, when data is available for viewing but the pane is collapsed.

Thank you,


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2007 at 1:17am
Hi,
get CXTPDockingPane pointer, get its parent as tabbed container:
 
CXTPDockingPaneTabbedContainer* pParent = (CXTPDockingPaneTabbedContainer*)pPane->GetContainer(),
 
find corresponded tab:

CXTPTabManagerItem* GetPaneTab(CXTPDockingPane* pPane) const
{
 for (int i = 0; i < pContainer->GetItemCount(); i++)
 {
  if (pContainer->GetItemPane(i) == pPane)
   return GetItem(i);
 }
 return NULL;
 
get rect using pItem->GetRect();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
alpine35 View Drop Down
Newbie
Newbie


Joined: 17 July 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote alpine35 Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2007 at 11:41pm
Hi Oleg,
 
I have followed your suggestion:
 
CXTPDockingPane* pPane = m_paneManager.FindPane(IDR_...);
CXTPDockingPaneTabbedContainer* pContainer = (CXTPDockingPaneTabbedContainer*)pPane->GetContainer();
 
The problem now is pContainer->GetItemCount() returns 0, although the tab item is available. Thanks for your help,
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2007 at 2:14am
Hi,
 
Sorry, didn't notice that you need tab when pane is hidden.
 
 
please add additional method  in sources and rebuild library (we will add it also)
 
in XTPDockingPaneAutoHidePanel.cpp:
 
CXTPTabManagerItem* CXTPDockingPaneAutoHidePanel::GetPaneTab(CXTPDockingPane* pPane) const
{
 for (int i = 0; i < m_pTabManagers->GetSize(); i++)
 {
  CAutoHidePanelTabManager* pTabManager = m_pTabManagers->GetAt(i);
  for (int j = 0; j < pTabManager->GetItemCount(); j++)
  {
   CXTPTabManagerItem* pItem = pTabManager->GetItem(j);
   if ((CXTPDockingPane*)pItem->GetData() == pPane)
   {
    return pItem;
   }
  }
 }
 return NULL;
}
 
 
now in you application use this code:
 
 
CXTPDockingPane* pPane = m_paneManager.FindPane(ID_VIEW_SOLUTIONEXPLORER);
 if (pPane && pPane->IsHidden())
 {
  CXTPDockingPaneAutoHidePanel* pAutoHideContainer =
   (CXTPDockingPaneAutoHidePanel*)(pPane->GetContainer()->GetContainer());
  CXTPTabManagerItem* pItem = pAutoHideContainer->GetPaneTab(pPane);
  if (pItem)
  {
   CRect rc = pItem->GetRect();
   pAutoHideContainer->ClientToScreen(rc);
  }
 }
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
alpine35 View Drop Down
Newbie
Newbie


Joined: 17 July 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote alpine35 Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2007 at 12:25pm
Thank you Oleg,
 
Works like a charm. Assumimg this change will be integrated forward in your future product, it's the perfect solution.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 2:40am
Thanks,
yes, it will be.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.