method XMLGrid.Images (Handle as Variant)
Sets at runtime the control's image list. The Handle should be a handle to an Images List Control.

 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.

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.

 
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. Use the Image property to assign an icon to a node. In case you are using the LoadXML method, the Image property of the Node indicates the type of XML node being added. Use the Picture property to assign a picture to a node. In case you are using the LoadXML method, use the Images method to add images to the control, so each type of element in your XML file, has a specific representation. The first icon in the Images collection indicates the NODE_ELEMENT type, the second icon in the Images collection indicates the NODE_ATTRIBUTE type, and so on.

The following sample shows how to replace the entire list of icons, using a Microsoft Image List control ( ImageList1 ):

XMLGrid1.Images ImageList1.hImageList


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