Hello,
I would like to ask one question regarding the Fl_Text_Display wrapping.
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) );
The problem is that it's hard to say at which pixel the wrapping shall occur.
If I use 'm' letter, it jumps to the next line too early, and almost a half of
my lines stay empty. At that time I also see a horizontal scrollbar, no idea
why. If I used some other character in fl_width function, I'm afraid I might
go even beyond my line end.
Is there any way how to do it properly?
One more question - could I switch off the automatic displaying of the
scrollbars?
Thanks,
Kveto Ilencik
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk