[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomListBox.CheckIndex

Ensures that the Item index is within the bounds for the Items in the control.

Declaration

Source position: stdctrls.pp line 589

protected procedure TCustomListBox.CheckIndex(

  const AIndex: Integer

);

Arguments

AIndex

  

Index position examined in the method.

Description

CheckIndex is a procedure used to ensure that the specified index value is within the range of values allowed for the Items in the control. CheckIndex examines the value in AIndex, and raises an IndexOutOfBounds exception if it is not in the range 0 (zero) to Items.Count-1.

CheckIndex is used in the access specifiers for the Selected property (GetSelected, SetSelected).

Errors

Raises an IndexOutOfBounds exception when the index is out of bounds.

See also

TCustomListBox.Items

  

The list of all items defined in the control.

TCustomListBox.Selected

  

The Selected state for an item in the control.

TCustomListBox.GetSelected

  

Gets the value for the Selected property.

TCustomListBox.SetSelected

  

Sets the value for the Selected property.


Version 3.2 Generated 2024-02-25 Home