Skip to main content
Version: 20 R6

On Selection Change

CodeCan be called byDefinition
314D View Pro area - 4D Write Pro area - Form - Hierarchical List - Input - List BoxThe selection in the object is modified

Description

This event can be generated in different contexts.

4D View Pro

The current selection of rows or columns is modified. In this context, the event object returned by the FORM Event command contains:

PropertyTypeDescription
codelongint31
descriptiontext"On Selection Change"
objectNametext4D View Pro area name
sheetNametextName of the sheet of the event
oldSelectionsobjectCell range before change
newSelectionsobjectCell range after change

Example

 If(FORM Event.code=On Selection Change)
VP SET CELL STYLE(FORM Event.oldSelections;New object("backColor";Null))
VP SET CELL STYLE(FORM Event.newSelections;New object("backColor";"red"))
End if

List form

The current record or the current selection of rows is modified in a list form.

Hierarchical list

This event is generated every time the selection in the hierarchical list is modified after a mouse click or keystroke.

Input & 4D Write Pro

The text selection or the position of the cursor in the area is modified following a click or a keystroke.

List box

This event is generated each time the current selection of rows or columns of the list box is modified.