KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Horizontal and Vertical Padding for List Boxes
PRODUCT: 4D | VERSION: 19 R 6 | PLATFORM: Mac & Win
Published On: May 8, 2023

List Boxes are powerful and very customizable form objects. As of 4D v19 R6, List Boxes now have the following new properties: horizontal and vertical padding. These properties allow you to manipulate the inner margins or space between an element’s content and its border.



These properties can be set globally for the whole list box or for each element such as columns, headers, or footers.

These properties can be set through Design Mode or Programmatically.

Design mode:
These settings will appear in the list of properties under “Coordinates and sizing”.



Programmatically:
Like most List Box settings, these can be defined with the LISTBOX SET PROPERTY command.
Utilize the new constants, lk cell horizontal padding and lk cell vertical padding.

// Set Horizontal padding for the List box globally
LISTBOX SET PROPERTY(*; "LB"; lk cell horizontal padding; 5)
// Then Set a specific Horizontal padding for the footers
LISTBOX SET PROPERTY(*; "LB_Footer@"; lk cell horizontal padding; 15)
// Set vertical padding for the List box globally
LISTBOX SET PROPERTY(*; "LB"; lk cell vertical padding; 3)