Print Page | Close Window

Adding Control / Button to existing Tabbed Toolbar

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=6390
Printed Date: 12 November 2025 at 9:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding Control / Button to existing Tabbed Toolbar
Posted By: venkyhyd
Subject: Adding Control / Button to existing Tabbed Toolbar
Date Posted: 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



Replies:
Posted By: venkyhyd
Date Posted: 13 February 2007 at 7:12am

Any suggestions.......



Posted By: Oleg
Date 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


Posted By: venkyhyd
Date Posted: 13 February 2007 at 8:14am
Originally posted by oleg oleg wrote:

Hi,
 
Add button:
m_pToolBar->GetControls()->Add(..);
assign Category:
pControl->SetCategory("...");
and upadte tabs:
pToolBar->UpdateTabs();
 
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?


Posted By: venkyhyd
Date 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.


Posted By: Oleg
Date 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


Posted By: venkyhyd
Date Posted: 15 February 2007 at 1:48am
Hello
 
Attached sample to issue 12487
 
Pls suggest on it..


Posted By: venkyhyd
Date Posted: 28 February 2007 at 5:40am
Hello can you pls suggest on this issue#12662
thanks



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