matthiasm wrote:
> 
> On 07.09.2008, at 12:42, imacarthur wrote:
> 
>> 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.
> 
> No automatic way, but can call "measure(w, h)" on a label to get the 
> size required for the current settings and update the widget size 
> accordingly.

I wrote a "SmartGroup" class for FLTK a couple years ago that
specifically addresses adjusting the layout and size of widgets
within the group after localization (or just insertion of run-time
text...)  Basically, you use the SmartGroup class to group widgets
that need to be adjusted, and then call the "do_layout" method to
update them, potentially resizing the containing window to account
for the increased widget sizes...

I've put this and some of my other widgets up at:

     http://www.easysw.com/~mike/fltk-widgets/

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to