TCustomListBox.SelectRange procedure
Changes the selection state for a range of Items in the control.
Declaration
procedure SelectRange(ALow: Integer; AHigh: Integer; ASelected: Boolean)
; virtualArguments
ALow | Ordinal position for the initial item changed in the method. |
AHigh | Ordinal position for the final item changed in the method. |
ASelected | True if the items are selected; False when they are unselected. |
Description
SelectRange is a procedure used to change the selection state for
a range of
Items in the list box control to the value specified in
ASelected.
ALow and
AHigh contain the ordinal positions in Items
affected in the method. ALow must be a positive integer value or zero
(
0). AHigh must be less than the value in the Count property for
Items. When either value is out of range, no actions are performed in the
method.
When MultiSelect is set to True, the widgetset class is
notified of the changes to item selection state and
DoSelectionChange is called to trigger the
OnSelectionChange event handler (when assigned). No actions are
performed in the method when MultiSelect is set to False.
SelectRange is similar to the SelectAll method, but limits the
affected items to the specified range of values - and only when MultiSelect
is enabled.
Use SelCount to determine the number of Items selected in the
control when MultiSelect is enabled.
Use Selected to maintain the selection state for a single entry in
the Items property.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
