KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Disabling Listbox Highlight
PRODUCT: 4D | VERSION: 16R2 | PLATFORM: Mac & Win
Published On: April 13, 2017

4Dv16R2 Introduces a number of features for listboxes. One of the new features introduced is the ability to disable highlighting of selected row(s) in a listbox. When a row is selected it is typically applied with a system style highlight which may not look as nice when specific colors and styles have been applied to a listbox. By disabling the highlight it is possible to apply a custom style to reflect what has been selected with a by applying a custom style to the list box.

The highlight can be toggled in the properties list of a listbox:


It can also be toggled by code using the LISTBOX SET PROPERTY command with the lk hide selection highlight (16) selector and lk no (0) to disabled it or lk yes (1) to enable it.

//Disabled
LISTBOX SET PROPERTY(*;"ListBox";lk hide selection highlight;lk no)
//Enabled
LISTBOX SET PROPERTY(*;"ListBox";lk hide selection highlight;lk yes)


Shown bellow from left to right is a standard listbox with no rows selected, a list box with the default system highlight and a list box with the default system highlight disabled with a custom highlight set.