Toolbar dropdown buttons not visible

Toolbar dropdown buttons not visible

Post by Amit Dedhi » Fri, 10 Nov 2006 07:31:50


Hello

I have CToolbar derived class and my toolbar is always docked left
vertical. It has a "customise" tool button. When user presses it, a
dialog comes up which allows the user to select/deselect which of the
tool buttons to show. When the user presses Ok button, the dialog
disappears and it is supposed to show the buttons which the user
selected and hide others.

Initially i faced the problem that even though I was calling
ToolbarCtrl.HideButton() correctly for all tool buttons, they were not
visible. The reason was that it was adding them horizontally (next to
prev button) and hence the buttons were not visible. Hence I set the
state TBSTATE_WRAP for each button and it works ok.

However, there is still one problem left.

The toolbar has few buttons which are dropdowns. If there was no
visible dropdown button when the toolbar was displayed for the first
time initially, then the toolbar width is equal to the toolbutton
width. Now, if the user selects to see any of dropdown buttons, it does
not show them at all. The width of the toobar is not increased.

Anyone knows how to fix this?

Thanks and best regards
Amit Dedhia