Question:
How can I load figures into the MSCOMCTL Library’s Treeview control?
Solution:
To do so, you must first insert onto screen the MSCOMCTL Library’s ImageList object to store the figures to be used by Treeview. Then, to insert the figures, open the ImageList object’s settings window and click on Images tab’s Insert Picture… button.
To insert the figures via scripts, you must use LoadPicture() function. For example:
Set IL = Item("ImageList1")
IL.ListImages.Add ,,LoadPicture("file.ico")
To load a figure into Treeview, you must set its ImageList‘s index in the Treeview’s Add() method. For example:
Set Treeview = Screen.Item("TreeView1")
Treeview.Nodes.Add ,,,"String shown on Treeview", figure's index from the ImageList