On 7 Sep 2008, at 4:53, Robert Arkiletian wrote:
> Another question that has come up is space on a button for translated
> text (which is potentially longer than english).  Is there any
> mechanism in FLTK to ensure the label of a button fits in the button?

No, 'fraid not.
Which is often a problem - it turns out, in my limited experience,  
that a lot of languages seem to be "longer" or "less compact" than  
English, so I've struggled with this a bit.

The "solutions" seem to be either to make your buttons a bit bigger  
than you think you need (or make the font smaller), or to dynamically  
create the button at runtime, once you have measured it's label string.

The first method is simple but clunky, but works if you need to keep  
the button layout constant.
The second method I've used when there were only one or two buttons,  
and their exact layout position wasn't so important.

Neither is ideal...

-- 
Ian


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to