Dynamic labels for buttons with (oddshaped) icon images?

J. Landman Gay jacque at hyperactivesw.com
Fri Feb 6 00:35:52 EST 2009


Klaus Major wrote:

>> True. But if the engine calculated and provided for a vertically 
>> centered name, you'd get the same results. So you'd have to "jiggle" 
>> some more anyway. :)
> 
> Maybe, but when you habve a button with no icon, that name/labe is 
> exactly in the center of the button.
> And it stays there whenever you resize the button.
> 
> If you have a button with an icon and "showname" = false, the icon is 
> also exactly in the center of the button.
> And it also stays there whenever you resize the button.
> 
> Maybe I'm thinking  a bit naive, but why shouldn't it then be possible 
> (for the engine) to combine these two
> "states" and the result would be "the label on top of the icon" :-)

I see what you mean now. Yes, it would be much easier. Most of the image 
buttons I've made are set to the specific size of their image, so it 
hasn't been an issue for me. But yeah, having the engine do it would be 
a nice touch.

I suppose it would be possible to write a little script that would 
calculate the font size, compare it to the button height, and adjust the 
margins.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list