While working on the toolbar editor for the Visual Designer I could not get the size of the buttons to change as requested.
After you load a toolbar in EB there are 2 commands you use to change the size of the buttons and the bitmaps.
CONTROLCMD window | dialog, toolbarID, @TBSETBITMAPSIZE, width, height
CONTROLCMD window | dialog, toolbarID, @TBSETBUTTONSIZE, width, height
And there are 2 commands to read what the sizes are set to.
width = CONTROLCMD ( window | dialog, toolbarID, @TBGETBUTTONWIDTH )
height = CONTROLCMD ( window | dialog, toolbarID, @TBGETBUTTONHEIGHT )
I spent several hours trying to juggle things around to get it to work correctly.
To see what was going on I:
printed the desired size
issued the command with those sizes
then issued the command to read the sizes back.
No matter what values I entered for button size it would not change.
Then I accidently found what the problem was; it has to do with order.
This order will result in the button size remaining unchanged:
CONTROLCMD window | dialog, toolbarID, @TBSETBUTTONSIZE, width, height
CONTROLCMD window | dialog, toolbarID, @TBSETBITMAPSIZE, width, height
This order will result in the button size changing as requested.
CONTROLCMD window | dialog, toolbarID, @TBSETBITMAPSIZE, width, height
CONTROLCMD window | dialog, toolbarID, @TBSETBUTTONSIZE, width, height
Using the command by itself will result in the button size changing as requested.
CONTROLCMD window | dialog, toolbarID, @TBSETBUTTONSIZE, width, height
Hope this saves someone some grief.
LarryMc
Thanks Larry,i dont know that...
It is usefull of course.