Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How to hide Toolbar Items or swap them Collapse All
Subject Author Date
Douglas Hoppes Aug 31, 2010 - 12:28 PM

Hi all,

I’m trying to figure out the best method to solve this issue. On my toolbar, I have a Toolbar Button called "Review Images". I also have a Toolbar Button called "Show Live". I want to toggle these icons. The only methods that I see are to remove and insert the toolbar buttons.

Is there an easy method to swap icons or to show one icon and not the other?

Doug

mike dukes Oct 30, 2020 - 10:31 AM

You are able to swap any of the menu item that you do not like. Hover you mouse on the dish and click the "swap" button on the top right corner. We provide recommendations for similar menu items fitting your nutrition profile, but you can also manually search for any dish you might want to try.
ur diabetes-friendly meal plans are designed as recipe pairings with very specific requirements. Our main and side dishes are intentionally paired together to fit the “balanced plate” model. If you swap a recipe that is accompanied by a main or side dish in a diabetes-friendly plan, it is possible the newly selected recipe will no longer fit this model.

Technical Support Aug 31, 2010 - 12:55 PM

It’s possible to hide any toolbar button by applying the TBBS_HIDDEN toolbar button style:

UINT nCommandID = . . .
bool bShowButton = . . .
CExtToolControlBar * pToolBar = . . .
int nButtonIndex = pToolBar->CommandToIndex( nCommandID );
            if( nButtonIndex < 0 )
                        return . . .
CExtBarButton * pTBB = pToolBar->CommandToIndex( nButtonIndex );
            ASSERT_VALID( pTBB );
UINT nAdd = bShowButton ? 0 : TBBS_HIDDEN;
UINT nRemove = bShowButton ? TBBS_HIDDEN : 0;
            pTBB->ModifyStyle( nAdd, nRemove );
CFrameWnd * pWndParentFrame = pToolBar->GetParentFrame();
            if( pWndParentFrame == NULL )
                        return . . .
            pWndParentFrame->RecalcLayout();
But, unfortunately, button swapping is not supported. But changing toolbar buttons with CExtToolControlBar::SetButtons(), CExtToolControlBar::LoadToolBar(), CExtToolControlBar::InsertButton()>, CExtToolControlBar::InsertSpecButton()> and/or CExtToolControlBar::RemoveButton() is fast.