Adds a new icon, replaces an icon or clears the control's image list.
Type | Description | |||
Icon as Variant | A long expression that indicates the icon's handle. | |||
Index as Variant | A long expression that indicates the index where icon is inserted. |
Return | Description | |||
Long | A long expression that indicates the index of the icon in the images collection |
Use the ReplaceIcon property to add, remove or replace an icon in the control's images collection. Also, the ReplaceIcon property can clear the images collection. Use the Images method to attach a image list to the control.
The following sample shows how to add a new icon to control's images list:
i = ExChartView1.ReplaceIcon( LoadPicture("d:\icons\help.ico").Handle), i specifies the index where the icon is added
The following sample shows how to replace an icon into control's images list::
i = ExChartView1.ReplaceIcon( LoadPicture("d:\icons\help.ico").Handle, 0), i is zero, so the first icon is replaced.
The following sample shows how to remove an icon from control's images list:
ExChartView1.ReplaceIcon 0, i, i specifies the index of icon removed.
The following sample shows how to clear the control's icons collection:
ExChartView1.ReplaceIcon 0, -1