method HTML.ToolBarReplaceIcon ([Icon as Variant], [Index as Variant])
Adds a new icon, replaces an icon or clears the toolbar's image list.

TypeDescription
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
ReturnDescription
LongA long expression that indicates the index of the icon in the images collection.

The ToolBarImages / ToolBarReplaceIcon methods defines the icons to be displayed on the control's toolbar. The ToolBarHTMLPicture property adds/removes custom-size pictures to be shown on the control's tollbar. The ToolBarItems property defines the control's toolbar format.  The TollBarSize specifies the size / visibility of the control's toolbar. The ToolBarEvent event notifies your application that the user selects, edits, checks or un-checks an item in the control's toolbar.  The ToolBarAnchor property gets or sets the edge of the control to which the toolbar is bound and determines how the toolbar is resized with its control.  The ToolBarBorderSize property specifies the size of the border of the control's toolbar.

The following sample shows how to add a new icon to toolbar's images list:

i = HTML1.ToolBarReplaceIcon( LoadPicture("d:\icons\help.ico").Handle), where i is the index to insert the icon

The following sample shows how to replace an icon into toolbar's images list::

 i = HTML1.ToolBarReplaceIcon( LoadPicture("d:\icons\help.ico").Handle, 0), in this case the i is zero, because the first icon was replaced.  

The following sample shows how to remove an icon from toolbar's images list:

 HTML1.ToolBarReplaceIcon 0,  i, in this case the i must be the index of the icon that follows to be removed

The following sample shows how to clear the toolbar's icons collection:

 HTML1.ToolBarReplaceIcon 0,  -1