FLTK logo

Re: [fltk.general] Fl_Input text size and height

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Fl_Input text size and height Albrecht Schlosser May 14, 2021  
 
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

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/0aaf1909-f2b4-cebc-cb06-fb6584f83a9e%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.