On 5/14/21 12:35 PM W. B. wrote:
> I have a Fl_Table of widgets - let's say Fl_Input widgets.
> The Table resize function is written so the table automatically resizes
> with Window width, and it's widgets resize accordingly. So I have some
> rows set to adjust their length. The same is done for the height of the
> widgets - multiline Fl_Inputs are taken into account and the row-sizes
> are adjusted.
>
> It works pretty well with "normal" multiline Fl_Inputs by calculating
> the needed height and width by fl_measure - the newlines or empty lines
> are taken into account.
>
> Is it possible to do the same with "wrap" Fl_Inputs? fl_measure looks
> only for newlines...
see below ...
> -> I need to calculate the "full needed" height of a "wrap" Fl_Input -
> the width of which is known/calculated before
>
> I hope it's understandable what I mean
Unfortunately not, at least not for me. What do you mean with /"wrap"
Fl_Input/ ? This is not a term used in FLTK and FLTK Fl_Input widgets
don't wrap text AFAICT.
Regarding fl_measure(): you can initialize the argument 'int &w' with a
value other than 0 to wrap the text virtually within that width when
fl_measure() calculates the effective width and height.
https://www.fltk.org/doc-1.4/group__fl__drawings.html#gaccd92d0c0521b0aac30dcb856d438dcd