![]() |
How do add other controls to tab bar? |
Post Reply
|
| Author | |
jeffcmj
Groupie
Joined: 28 October 2004 Status: Offline Points: 92 |
Post Options
Thanks(0)
Quote Reply
Topic: How do add other controls to tab bar?Posted: 20 May 2005 at 8:45am |
|
Hi, is there a way to add more custom buttons/control to a tab bar? My current project needs to do that but I have no idea on how to. Thanks |
|
![]() |
|
jeffcmj
Groupie
Joined: 28 October 2004 Status: Offline Points: 92 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 June 2005 at 11:48am |
|
Basically what I want is to add another button on the left of 3 navigation buttons. At first, I looked for an function like "AddNavigationButton(...) ", but found nothing. So could oleg or other toolkit guru give some advices ?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 June 2005 at 1:31am |
|
right, seems we forgot GetNavigateButtons method, so you must 1. overrdie CXTPTasbControl, 2. in constructor call m_arrNavigateButtons.Add(new CNavigateButtonOptions(this, xtpTabNavigateButtonAlways)); 3. create CNavigateButtonOptions and override virtual void DrawEntry(CDC* pDC, CRect rc); // to draw |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jeffcmj
Groupie
Joined: 28 October 2004 Status: Offline Points: 92 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 June 2005 at 11:12pm |
|
Thanks oleg. But it looks like the mdi tab is not done by CXTPTasbControl. It's CXTPTabClientWnd.Do you know where shall I override? If it's not possible, may I ask you to put this issue to v10.0? Thanks |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 June 2005 at 11:29pm |
|
Yo can try override CXTPTabClientWnd::CWorkspace* AddWorksapce(int nIndex) call base class and add new button for new workspace. We added CXTPTabManager::GetNavigateButtons() member for next release. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jeffcmj
Groupie
Joined: 28 October 2004 Status: Offline Points: 92 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 June 2005 at 2:28am |
|
Thanks oleg. That's exactly what I tried to do. But it seems the derived class can not access the m_arrNavigateButtons. CMaxTabManager::CWorkspace* CMaxTabManager::AddWorksapce(int nIndex) If I un-comments the above line, there will be a compiling error. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 June 2005 at 4:06am |
|
I know :) Whats why we added CXTPTabManager::GetNavigateButtons, please patch your source to make it possible: in XTPTabManagher.h: add typedef CArray<CXTPTabManagerNavigateButton*, CXTPTabManagerNavigateButton*> CXTPTabManagerNavigateButtons; CXTPTabManagerNavigateButtons* CXTPTabManager::GetNavigateButtons() { } |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jeffcmj
Groupie
Joined: 28 October 2004 Status: Offline Points: 92 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 June 2005 at 4:40am |
|
Thanks. Now I am able to add more navigate buttons. But may I have another little request. I would like my navigate button on the left side of the tab bar. I used the following code, in my derived CXTPTabManagerNavigateButton class: virtual void Reposition(CRect& rcNavigateButtons) It supposed to work, but actually not. With above code, the tab item will not be drawn. Will it work in 9.7 or 10.0 ? Best Jeff |
|
![]() |
|
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 |