Ensures that an Index position is valid for the bounds of the image list.
Source position: imglist.pp line 312
protected procedure TCustomImageList.CheckIndex( |
AIndex: Integer; |
AForInsert: Boolean = False |
); |
AIndex |
|
Index position validated in the method. |
AForInsert |
|
True when the index position is used for insertion (default is False). |
CheckIndex is a procedure used to ensure that the value in AValue is a valid index position for the operations in the class.
AForInsert indicates if AValue is constrained to the existing range of ordinal positions in the list. When AForInsert contains True, AValue must be less than the Count property. When AForInsert is False, the index value is for an append operation and can contain a value less than or equal to the Count property.
An EInvalidOperation exception is raised when AValue is not in the required range for the specified operation.
CheckIndex is used in the implementation of various methods in the class.
Raises an EInvalidOperation exception when the index is out of bounds. Raised with the message in SInvalidIndex.
Lazarus Component Library (LCL) | Version 3.99-1b97b99691 (2024-09-01) | Home |