I want a toolbar to display only images, but I haven't found a style& value that will make it happen.
So, I experimented with setting button text values to "". If I set all buttons to "", then the toolbar height shrinks to icon height only. I want that sometimes, but would like not to have to change text values for every button - especially on long toolbars with many buttons.
Here's the funny part. In the following example of a toolbar with 4 buttons, if I set the 3rd and 4th text values to something, the toolbar height grows to include the text. If I make any other combination of button text - leaving some blank and others filled, the toolbar does not not show text and the height is that of only the toolbar button icons.
For example, putting text in buttons 1 and 2 results in no text showing and a thinner toolbar. Also, putting text in buttons 2 and 3 results in no text showing and a thinner toolbar.
Here's the code that displays text (less the dialog and imagelist code).
All other combinations result in no text (except for text in all positions, of course).

Is there an explanation for this? I'd prefer to leave the buttons texts as some value and flip a property that hides all text. But for now I'll just set all text to "".
So I have a solution but still wonder why the various combinations of text and non-text work the way they do.
So, I experimented with setting button text values to "". If I set all buttons to "", then the toolbar height shrinks to icon height only. I want that sometimes, but would like not to have to change text values for every button - especially on long toolbars with many buttons.
Here's the funny part. In the following example of a toolbar with 4 buttons, if I set the 3rd and 4th text values to something, the toolbar height grows to include the text. If I make any other combination of button text - leaving some blank and others filled, the toolbar does not not show text and the height is that of only the toolbar button icons.
For example, putting text in buttons 1 and 2 results in no text showing and a thinner toolbar. Also, putting text in buttons 2 and 3 results in no text showing and a thinner toolbar.
Here's the code that displays text (less the dialog and imagelist code).
Code:
Toolbar Add Button hdlg, 500, 1, 1, %TbStyle_Button, "" Toolbar Add Button hdlg, 500, 2, 2, %TbStyle_Button, "" Toolbar Add Button hdlg, 500, 3, 3, %TbStyle_Button, "x" Toolbar Add Button hdlg, 500, 4, 4, %TbStyle_Button, "x"

Is there an explanation for this? I'd prefer to leave the buttons texts as some value and flip a property that hides all text. But for now I'll just set all text to "".
So I have a solution but still wonder why the various combinations of text and non-text work the way they do.
Comment