Print Page | Close Window

Un-removing a button from the toolbar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=14929
Printed Date: 27 September 2024 at 4:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Un-removing a button from the toolbar
Posted By: tralfaz
Subject: Un-removing a button from the toolbar
Date Posted: 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



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


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


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


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



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