Sign in Join
FPDoc Onlineexperiment

TCustomListBox.OnSelectionChange property

Member of TCustomListBoxpublicIn unit StdCtrls

Handler invoked when an item is selected in the control.

Declaration

pascal
property OnSelectionChange: TSelectionChangeEvent read FOnSelectionChange write FOnSelectionChange;

Description

OnSelectionChange is a TSelectionChangeEvent property with the event handler signalled when an item selection on the control has been changed. OnSelectionChange is signalled (when assigned) from the DoSelectionChange method, and occurs prior to calling the Click method for the control.

The User argument indicates whether the selection change results from user interaction with the control (True), or from code or methods called at run-time (False).

On the Windows platform, OnSelectionChange is signalled when the user clicks on a list item that is already selected. It is also signalled when a mouse click occurs on an unused area on the list box control. These behaviors are built in to the native control on the platform, and are not configurable.

Use OnClick to perform actions when the mouse is clicked on an item on the list box control.

Use ClickOnSelChange to indicate whether Click / OnClick are called when the left mouse button is released during a click action or when OnSelectionChanged is performed for the control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.