![]() |
Expand Button drawn wider when it should be hidden |
Post Reply ![]() |
Author | |
richards ![]() Newbie ![]() Joined: 02 June 2009 Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() Posted: 03 June 2009 at 10:56am |
When I call pTB->ShowExpandButton(false) from the main frame's OnCreate, it works fine. If I call it from within a command handler, the ExpandButton appears as a normal size button on the toolbar. How can I hide the expand button in the context of a menu command handler? I'm using Toolkit Pro v 13.0.0 with Microsoft Visual Studio 2008 Version 9.0.21022.8. Here's the code: void CMainFrame::LockToolbars(bool lock) { bool is_enabled = !lock; CXTPCommandBars *pCBs = GetCommandBars(); pCBs->EnableCustomization(is_enabled); int n = pCBs->GetCount(); for (int i=0; i<n; i++) { CXTPToolBar *pTB = pCBs->GetAt(i); if (pTB) { pTB->SetShowGripper(is_enabled); pTB->ShowExpandButton(is_enabled); pTB->SetCloseable(is_enabled && (pTB != m_pMenuBar)); pTB->EnableDocking(lock ? 0 : ( xtpFlagAlignAny | xtpFlagFloating)); pTB->Invalidate(); } } pCBs->UpdateCommandBars(); } |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Try also manually hide it pPopupExp = (CXTPControlPopup*)pToolBar->GetControls()->FindControl(XTP_ID_TOOLBAR_EXPAND);
pPopupExp->SetVisible(FALSE);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
richards ![]() Newbie ![]() Joined: 02 June 2009 Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
Thanks, that works.
And thanks for a great product, by the way! This has really transformed the look and feel of my app with only a few day's effort. |
|
![]() |
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 |