![]() |
Tab Item Screen Rect |
Post Reply
|
| Author | |
alpine35
Newbie
Joined: 17 July 2007 Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Topic: Tab Item Screen RectPosted: 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, |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
alpine35
Newbie
Joined: 17 July 2007 Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
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,
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
alpine35
Newbie
Joined: 17 July 2007 Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 July 2007 at 2:40am |
|
Thanks,
yes, it will be.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |