![]() |
Adding Control / Button to existing Tabbed Toolbar |
Post Reply
|
| Author | |
venkyhyd
Groupie
Joined: 29 June 2006 Location: India Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Topic: Adding Control / Button to existing Tabbed ToolbarPosted: 13 February 2007 at 12:49am |
|
Hello
How can we added a Control / Button to already existing Tabbed Toolbar.
Here CXTPTabtoolbar m_pToolbar = (CXTPTabToolBar*)pCommandBars->Add(_T("FPD"), xtpBarFloating, RUNTIME_CLASS(CXTPTabToolBar));
m_pToolBar->InsertCategory(0, _T("FPD"), StandardIcons, _countof(StandardIcons)); would create a new tab and adds the controls to that particular tab.
Now at situations I would like to add control / controls individually to the existing tab in the Tabbed Toolbar.
thanks
|
|
![]() |
|
venkyhyd
Groupie
Joined: 29 June 2006 Location: India Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 February 2007 at 7:12am |
|
Any suggestions....... |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 February 2007 at 7:44am |
|
Hi,
Add button:
m_pToolBar->GetControls()->Add(..);
assign Category:
pControl->SetCategory("...");
and upadte tabs:
pToolBar->UpdateTabs();
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
venkyhyd
Groupie
Joined: 29 June 2006 Location: India Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 February 2007 at 8:14am |
Hello
Here the Tab is already created and populated with Buttons on it.
So by calling m_pToolBar->GetControls()->Add(xtpControlButton);
would add a control to that particular tab in the Tabbed Toolbar but how to get handle to the control so as to say pControl->SetCategory?
|
|
![]() |
|
venkyhyd
Groupie
Joined: 29 June 2006 Location: India Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 February 2007 at 9:05am |
|
Hello
By creating control in this way will not call OnCreateControl, wereas we need to go through OnCreateControl path.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 February 2007 at 9:29am |
|
Hi,
Check code of XTPTabToolBar::InsertCategory to understand how it works.
You can send WM_XTP_BEFORECREATECONTROL if you wish:
XTP_COMMANDBARS_CREATECONTROL cs;
...
...
if (SendMessage(WM_XTP_BEFORECREATECONTROL, 0, (LPARAM)&cs) != 0)
{ pControl = cs.pControl; } |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
venkyhyd
Groupie
Joined: 29 June 2006 Location: India Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 February 2007 at 1:48am |
|
Hello
Attached sample to issue 12487
Pls suggest on it..
|
|
![]() |
|
venkyhyd
Groupie
Joined: 29 June 2006 Location: India Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 February 2007 at 5:40am |
|
Hello can you pls suggest on this issue#12662
thanks
|
|
![]() |
|
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 |