method G2antt.Images (Handle as Variant)

Sets the control's image list at runtime.

   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 user can add images at design time, by drag and drop files to combo's image holder. Use the RepaceIcon method to add, remove or clear icons in the control's images collection. Use the CellImage, CellImages properties to assign icons to a cell. Use the CellPicture property to assign a custom size picture to a cell. Use the CheckImage or RadioImage property to specify a different look for checkboxes or radio buttons in the cells. 

The following VB sample adds the control's icons list from a BASE64 encoded string:

If you run the sample you get:

The following VB sample loads images from a Microsoft Image List control:

G2antt1.Images ImageList1.hImageList

The following C++ sample loads icons from a BASE64 encoded string:

The following C++ sample loads icons from a HIMAGELIST type:

SHFILEINFO sfi; ZeroMemory( &sfi, sizeof(sfi) );
 m_g2antt.Images( _variant_t( (long)hSysImageList ) );

The following VB.NET sample loads icons from a BASE64 encoded string:

The following C# sample loads icons from a BASE64 encoded string:

The following VFP sample loads icons from a BASE64 encoded string: