to post a new message or reply to an existing one. If you are not registered, please
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Sep 21, 2011 - 6:14 AM
having created a
CExtToolControlBar-derivated button bar with fixed button positions:
CExtBarButton * p_Btn = p_Bar->GetButton(1);
p_Btn->Show(! p_Btn->IsVisible() ); // toggle
This leads to a gap between button 0 and 2 as a result of the hide action.
I tried to call
as well as
, but without success. Even worse: calling any of these functions leads to a reset of the p_Btn->
How can I correctly do show/hide of buttons with a subsequent re-arrangement of the bar, i.e. without getting gaps between buttons?
Thanks in advance for your help.
Sep 22, 2011 - 2:08 PM
Please do not use the
Show() method. The toolbar also invokes it while computing its inner buttons layout. The toolbar tries showing all its buttons. If there is not enough space for them, some buttons become hidden and you can access them through the chevron button. If you need to hide a button regardless of any conditions, you should apply the
TBBS_HIDDEN toolbar button style.