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 The Handle parameter can be:
  • A string expression that specifies the ICO file to add. 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("c:\temp\copy.ico") method adds the sync.ico file to the control's Images collection (string, loads the icon using its path) 
  • 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..." (string, loads icons using base64 encoded string)
  • A reference to a Microsoft ImageList control (mscomctl.ocx, MSComctlLib.ImageList type) that holds the icons to add (object, loads icons from a Microsoft ImageList control)
  • A reference to a Picture (IPictureDisp implementation) that holds the icon to add. For instance, the VB's LoadPicture (Function LoadPicture([FileName], [Size], [ColorDepth], [X], [Y]) As IPictureDisp) or LoadResPicture (Function LoadResPicture(id, restype As Integer) As IPictureDisp) returns a picture object (object, loads icon from a Picture object)
  • 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 (long, loads icon from HIMAGELIST type)
The control provides an image list window, that's displayed at design time. The ImageSize property defines the size (width/height) of the icons within the control's Images collection. 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

With XMLGrid1
    .BeginUpdate
        .Images "gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwCAw0Tf9dYGLAGLYGEvsQxGNxmSqmOymPzGYyFvwyAyeSzGiysPpObxmozWlxOWztlyWkx+x02j2usoOcjWqzOh020xOvrOf32J23G3GyyfHmu6jPO3vM4nA4vCqPU5nK12gjOg7WmmnEjfQ7O/03E6fm4PWpXow/f5Gz8AA0HM7uTmmY8W7xnE6T3vU5bGPYpz1vW9zvNu+UDuq+7XJk3j9ue5MAwRBsCKpAyNQs5T7wc+afN46SNOpDsMK/C0OQU/CjxK88NxJAMTrPFLDwk68AxNGa4QsrjqR3IEgyFIciI0iwfJXJCPJAkSSAAkqUSgnEHyKmCKI2eZ/yyjZwH/LsuB+cAfvGB5gAe8YBmAAaNkAAM2zZN0pIzNc1o3Ok2AOQADy4A5wT2jR8AfQKNn8B9Co2f5P0TREHoCA=="
        With .Nodes
            With .Add("Root")
                .Image = 1
            End With
        End With
    .EndUpdate
End With