method G2antt.Images (Handle as Variant)

Sets the control's image list at runtime.

 TypeDescription 
   Handle as Variant A long expression that identifies a handle to an Image list  ( the Handle should be of HIMAGELIST type ) or a string expression that indicates the base64 encoded string that holds the icons list. Use the eximages tool to save your icons as base64 encoded format.    

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) );
 HIMAGELIST hSysImageList = (HIMAGELIST)SHGetFileInfo(_T("C:\\"),  0, &sfi, sizeof (SHFILEINFO), SHGFI_SMALLICON | SHGFI_SYSICONINDEX  );
 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:

 


Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.