button width on different platforms

Warren Samples warren at warrensweb.us
Wed Jan 4 16:22:56 EST 2017


On 01/04/2017 01:05 PM, Matt Maier wrote:
> I've got some buttons with text in them. On Windows (where I develop) they
> look fine. On Linux the buttons are a little bit narrower so the text is
> cut off.
>
> Anyone handled a similar problem?


Matt,

I would suggest dynamically  setting the width of the buttons to the 
formattedWidth of the buttons is the most correct thing to do. You may 
also set the height of the buttons the same way. You will find the 
actual space needed changes with font selection.

I have suggested always setting the height of text fields the same way 
but for some reason that doesn't seem to go over very well. Personally 
I'm not a big fan of fixed height text fields which cut off the 
contained text. This is very common to see in Linux with LiveCode things 
developed on other platforms, including the IDE.

In any event, maybe the worst approach, and also the most common, is to 
start dictating the font selection and size. You can never know what 
reasons the user may have for using a particular font or size.

Dynamic layout is really the best way to go whenever possible. Ask a web 
developer.


Warren




More information about the use-livecode mailing list