
Toolbar buttons not resizing properly
Hi,
I have a toolbar with several buttons on it. I have some code that loops
over the buttons and changes them to a larger size on demand (using
ButtonHeight and ButtonWidth properties). Using this logic, I can switch
back and forth from large to small buttons just fine.
I recently tried adding captions to the buttons on the fly. When the user
chooses large buttons, I set the captions to some text (stored locally in
the Tag field for each button). But when I set the buttons to the small
size, I "delete" the captions by setting them to an empty string (literal
""). In this case, the toolbar resizes itself to a smaller size, and the
smaller icons are assigned ok, but the button height stays large (buttons
appear now as being "truncated" off the bottom of the toolbar), and the
button width stays wide. It seems like once I set the caption to anything,
the buttons will not get small again. I have tried setting the caption to
Nothing, vbNullString, etc. as well as refreshing the toolbar -- all to no
avail.
Anyone ever seen this or have any clue about why this might not work. I
checked MSKB, but found no message for this phenomenon...
Thanks to all in advance,
Vinnie