![]() | Type | Description | ||
| 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 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, CellImages properties to assign icons to a cell. Use the CellPicture property to load a picture in a cell.
The following VB sample adds two icons to the control's images collection using the BASE64 encoding strings:
The following template adds two icons to the control's images collection using the BASE64 encoding strings:
The following VB sample shows how to replace the entire list of icons, using a Microsoft Image List control ( ImageList1 ):
Grid1.Images ImageList1.hImageList
The control copies the images list, so destroying the source of the images list should not affect the images in the control.
The following C++ sample loads icons from a BASE64 encoded string:
The following C++ sample loads icon 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_grid.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: