> I want to display a long string without any end of line characters in it, but 
> I want the string to be wrapped according to the widget width. It means that 
> if there is a word longer that the widget width, the word shall be cut, and 
> the rest of it shall be displayed on the new line. If there are more shorter 
> words, the wrapping shall devide the text, so the words remain complete, and 
> continue on the next lines.
> I'm using the wrap_mode function:
>
> double width = fl_width("m");
> m_textDisplay->wrap_mode( 1, (int)((double)m_textDisplay->w()/width) );

I also wanted to do this, and discovered that if you set the width to
0 it wraps as you expect.  I don't think the documentation mentions
this.

> One more question - could I switch off the automatic displaying of the 
> scrollbars?

... and I wanted to do this too.  I got around it by doing
scrollbar_width(0).  0 it seems is the answer today :)

In general, fltk seems to like to present monolithic widgets with
somewhat spotty and ad hoc support for customization.  I'd rather
widgets that scroll present a scrollable interface that you can later
compose with a scrollbar-adding widget.  But anyway, it is what it is.

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

Reply via email to