Rx Icon List

RX Library

Control Name Unit Class
Icon List IcoList TIconList

Description: The TIconList class is a container for a group of icons. This class used internally by TRxTrayIcon component. To add an icon to the icon list, use the Add, AddResource, Insert, InsertResource and LoadResource methods. To retrieve an icons by its index from the icon list, use the Icons property and the Indexof property to obtain the icon listing from it's index.


Property Icons[Index: Integer]
Declaration: Icons[Index: Integer]: TIcon;

The Icons property returns the icon specified by Index as an TIcon object.


Method Add
Declaration: function Add(Icon: TIcon): Integer; virtual;

The Add method adds an icon to the list of icons. Specify the icon to insert as the value of the Icon parameter. Add returns the index of the added icon.


Method AddResource
Declaration: function AddResource(Instance: THandle; ResId: PChar): Integer; virtual;

The AddResource method loads an icon resource by ResID identifier and adds its to the list of icons. AddResource returns the index of the added icon.


Method IndexOf
Declaration: function IndexOf(Icon: TIcon): Integer; virtual;

The IndexOf method returns the position of an icon in a list. The first position in a list is 0. If an icon is not in the list, IndexOf returns -1.


Method Insert
Declaration: procedure Insert(Index: Integer; Icon: TIcon); virtual;

The Insert method inserts an icon into the list of icons. Specify the icon to insert as the value of the Icon parameter. Specify the position in the list where you want the icon inserted as the value of the Index parameter. The index is zero-based, so the first position in the list has an index value of 0.


Method InsertResource
Declaration: procedure InsertResource(Index: Integer; Instance: THandle; ResId: PChar); virtual;

The InsertResource method loads an icon resource by ResID identifier and inserts its into the list of icons. Specify the position in the list where you want the icon inserted as the value of the Index parameter.


Method LoadResource
Declaration: procedure LoadResource(Instance: THandle; const ResIds: array of PChar);

The LoadResource method loads the icons resources by ResIDs identifiers and adds them to the list of icons.


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000