method ComboBox.Images (Handle as Variant)

Sets at runtime the control's image list.

 TypeDescription 
   Handle as Variant The Handle parameter could be:
  • A long expression that identifies a handle to an Image List Control ( the Handle should be of HIMAGELIST type ). On 64-bit platforms, the Handle parameter must be a Variant of LongLong / LONG_PTR data type ( signed 64-bit (8-byte) integers ), saved under llVal field, as VT_I8 type. The LONGLONG / LONG_PTR is __int64, a 64-bit integer. For instance, in C++ you can use as Images( COleVariant( (LONG_PTR)hImageList) ) or Images( COleVariant( (LONGLONG)hImageList) ), where hImageList is of HIMAGELIST type. The GetSafeHandle() method of the CImageList gets the HIMAGELIST handle.
  • A string expression that indicates the BASE64 encoded string that holds the icons list. Use the Exontrol's ExImages Tool to save/load your icons as BASE64 encoded format. In this case the string may begin with "gBJJ..."
  • A string expression that specifies the ICO file to be loaded. The ICO file format is an image file format for computer icons in Microsoft Windows. ICO files contain one or more small images at multiple sizes and color depths, such that they may be scaled appropriately. For instance, Images("e:\working\sync.ico") method  adds the sync.ico file to the control's Images collection. ( available for DPI-Aware version only )
 
The control provides an image list window, that's displayed at design time. Use the ShowImageList property to hide the image list window, at design time. At design time, the user can add new icons to the control's Images collection, by dragging icon files, exe files, etc, to the images list window. At runtime, the user can use the Images and ReplaceIcon method to change the Images collection. The Images collection is 1 based. Use the CellImage property to assign an icon to a cell. Use the CellImages property to assign multiple icons to a cell. Use the HeaderImage property to assign an icon to the column's header. 

The following VB sample replaces the entire list of icons ( if it was loaded at design time ), using a Microsoft Image List control ( ImageList1 ):

ComboBox1.Images ImageList1.hImageList

The following VB sample initializes the Images collection using BASE64 encoded string:

The following C++ sample initializes the Images collection using BASE64 encoded string:

The following VB.NET sample initializes the Images collection using BASE64 encoded string:

The following C# sample initializes the Images collection using BASE64 encoded string:

The following VFP sample initializes the Images collection using BASE64 encoded string:

 

 


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