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?

To ensure ...: none that I'm aware of :-(

But if you set the alignment properly, you can get longer labels to 
wrap, something like

my_button->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE|FL_ALIGN_WRAP),

and maybe FL_ALIGN_CLIP as well.

If that doesn't help, then you could try to reduce the label font size. 
You can use fl_measure() [1] to test, if the label fits. From the docs: 
"If the incoming w is non-zero it will wrap to that width."

You could derive your own button widget (if you didn't do so already) 
and adjust the label font in the resize() method, for instance. If you 
do it with some reasonable limits, this might be okay. YMMV.

Albrecht

[1] http://www.fltk.org/doc-1.3/drawing.html#fl_measure
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to