Four Js Development Tools Forum

General => Ask Reuben => Topic started by: Reuben B. on June 17, 2021, 04:49:17 am



Title: Ask Reuben 77 - Readonly TextEdit / Multi-line Label
Post by: Reuben B. on June 17, 2021, 04:49:17 am
A LABEL was originally designed for one line of text.  If you display more to the LABEL than will fit on one line, it will either truncate or stretch horizontally the widget depending on the value of the SIZEPOLICY attribute.

To force a line-break, you need to place a \n in your label text i.e TEXT="Foo\nbar"

However what if you wanted it to wrap rather than forcing a line-break in a certain position?  One approach you can take in the absence of an attribute or Presentation Style for LABEL is to use a TEXTEDIT and make it look like a LABEL.

To find out how, read more at https://4js.com/ask-reuben/ig-77/