method ExPrint.ReplaceIcon ([Icon as Variant], [Index as Variant])
Adds a new icon, replaces an icon or clears the print'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 
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. Use the HTMLPicture property to display custom size pictures. Use the ToolBarFormat property to add new buttons, icons , pictures or any HTML caption to the eXPrint's toolbar. The ItemCaption property specifies the button's caption that may include icons, pictures if the <img> HTML built-in element is included. The Caption property specifies the name of the document, and may display icons or pictures as well, if <img> HTML tag is included. The ExtraCaption property adds custom captions to each page, and may display icons or pictures as well, if <img> HTML tag is included.

The following VB sample adds a new icon to control's images list:

 i = ExPrint1.ReplaceIcon( LoadPicture("d:\icons\help.ico").Handle), i specifies the index where the icon is added

The following VB sample replaces an icon into control's images list::

 i = ExPrint1.ReplaceIcon( LoadPicture("d:\icons\help.ico").Handle, 0), i is zero, so the first icon is replaced.  

The following VB sample removes an icon from control's images list:

 ExPrint1.ReplaceIcon 0,  i, i specifies the index of icon removed.

The following VB clears the control's icons collection:

 ExPrint1.ReplaceIcon 0,  -1

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.