Button text on icon image

Klaus Major klaus at major-k.de
Mon May 23 15:57:52 EDT 2005


Hi Dave,

> ...
> I had a similar problem with your script as Klaus.
> In my case, the icon's image size and the button size are the same.
> This is what I've found so far...
>
> On Windows (XP), if you keep the difference between the topMargin  
> and the bottomMargin the same as the textSize, the icon will appear  
> properly. And the value of the bottomMargin can be used to position  
> the text. So for example, with a button sized 100 x 30, and a  
> textSize of 14, setting margins to 0,20,0,6 is about right. On the  
> same button, but with a textSize set at 12, margins of 0,19,0,7  
> work well. The font used and the textHeight don't seem to matter.
> But on OS X, it seems the difference between the topMargin and  
> bottomMargin has to be 2 pixels more than the textSize (but I think  
> this difference may vary for different textSizes). For example,  
> with the same button and icon (100 x 30), with the textSize at 14,  
> margins of 0,22,0,6 works. With a textSize of 12, margins of  
> 0,20,0,6 work.

thanks for the hints, will surely try this out!

> Cheers for now
>
> Dave

Best

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list