KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Wordwrap behavior with listboxes
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: November 4, 2024

When working with the column sizing and content behavior within a listbox, there are different behaviors depending on what options are enabled whether in the property list of the listbox, or programmatically through LISTBOX SET PROPERTY.

One of the properties that can only be enabled programmatically is the "wordwrap" property. When used in conjunction with the listbox property "Automatic Row Height," it will display the content in the listbox differently. "Automatic Row Height" can be found under the listbox's column's property list, while wordwrap can be activated programmatically.

LISTBOX SET PROPERTY(*; "listbox"; lk allow wordwrap; lk yes)


When "Automatic Row Height" IS enabled and wordwrap IS enabled, the row height is calculated to make sure all the contents of the cell fit without being truncated.

When "Automatic Row Height" IS enabled and wordwrap IS NOT enabled, height is based on the numnber of paragraphs in the cell, and lines become truncated.

When "Automatic Row Height" IS NOT enabled and wordwrap IS enabled, when the column is resized, it will truncate the contents of the cell until only the first character remains.

When "Automatic Row Height" and wordwrap ARE BOTH NOT enabled, then the column will truncate all contents of the cell until there is no visible contents showing.