![]() |
Un-removing a button from the toolbar |
Post Reply
|
| Author | |
tralfaz
Groupie
Joined: 21 June 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
Quote Reply
Topic: Un-removing a button from the toolbarPosted: 07 August 2009 at 6:18pm |
|
If a button has been pulled off a toolbar, what function do I call to get it back. I tried these:
pControl->SetHideFlag(XTPControlHideFlags:::xtpNoHide, true); pControl->SetVisible(true); neither of them brought back the button. Thanks |
|
|
XP Pro SP3 / VS2008 C++ / Xtreme CommandBars v13.1.0 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 August 2009 at 3:22am |
|
Hi,
By "pulled off" you mean moved by user during cutsomization ? if so you have add it again with Add method.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
tralfaz
Groupie
Joined: 21 June 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 August 2009 at 11:14am |
|
Yes, pulled off by the user in Customize mode.
It's interesting that the button item is still part of the toolbar, but not visible. Why do I need to add it? Can't I flip a switch? |
|
|
XP Pro SP3 / VS2008 C++ / Xtreme CommandBars v13.1.0 |
|
![]() |
|
tralfaz
Groupie
Joined: 21 June 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 August 2009 at 3:04pm |
|
There is no Add method for the CXTPToolbar class. Perhaps you are confused. I want to make "pulled off" button visible again on a toolbar
Can you post some code? |
|
|
XP Pro SP3 / VS2008 C++ / Xtreme CommandBars v13.1.0 |
|
![]() |
|
tralfaz
Groupie
Joined: 21 June 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 August 2009 at 5:50pm |
|
Got it to work.
CXTPToolBar* pTBar = pCommandBars->GetToolBar(IDR_CUSTOM_TOOLBAR); if (pTBar) { CXTPControls* pControls = pTBar->GetControls(); pControls->Add(XTPControlType::xtpControlButton, nID, ButtonText, nPos); } |
|
|
XP Pro SP3 / VS2008 C++ / Xtreme CommandBars v13.1.0 |
|
![]() |
|
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 |