You need to add a ImageList control in your window and set it to (16x16).
TreeView:ImageList = <Your Image List>.
Put your icons and image inside the list .
Then in the add insert the position of the images:
TreeView:Add(parent, type, key, desc, <1>, <2> ).
<1> = INT Representing the position of your image inside the list for the unselected image.
<2> = INT Representing the position of your image inside the list for the Selected image.
chTreeView = chTreeView:TreeView.
chImageList = chImageList:ImageList.
chTreeView:ImageList = chImageList.
/* add a close folder image and a open image folder in position 1 and 2 respectively. */
chTreeView:ADD(,,"Root","Root",1,2).
No you can't set it up in the OCX Propreties because your tree view OCX doesn't see your Image List OCX . Progress creates a control-frame for each of them. You really need to get the com-handle of the Image List to assign it.
I always add images using the custom property of the OCX properties of the ImageList.
Code:chTreeView = chTreeView:TreeView. chImageList = chImageList:ImageList. chTreeView:ImageList = chImageList. /* add a close folder image and a open image folder in position 1 and 2 respectively. */ chTreeView:ADD(,,"Root","Root",1,2).