VLMenuPlus Reference

MethodSetImageList

See Also See Also Applies To Applies To

Sets the ImageList control that has the bitmaps corresponding to the menu items. VLMenuPlus control will use Key property of the ListImage item to identify bitmap corresponding to a menu item.

As in case of help messages, it uses clean caption as the key to lookup matching image from the ImageList control.

The bitmaps must have a gray [RGB (192, 192, 192)] background, otherwise they may not appear as desired on some window coloring schemes.

 

Syntax

object.SetImageList(anImageList As Object)

 

The SetImageList method syntax has these parts:

Part Description
object An object expression that evaluates to an object of VLMenuPlus type.
anImageList An object expression that evaluates to an object of ImageList type.

 

Sample

Following code snippet shows the usage of this method.

Sub Form_Load() 
   'ImageList1 has the bitmaps corresponding to the menu items. 
    Call VLMnuHlp1.SetImageList(ImageList1) 
End Sub 

Remark

SetMenuItemAttributes event provides another way by which you can specify bitmaps corresponding to a menu item. At this stage you can also specify the background color of the bitmap.

Please note even if caption of any of the top level menu items matches with the captions specified in default bitmap list, control will not automatically show bitmap next to them.