TreeView, PictureListBox, DropDownPictureListBox, Toolbar controls
The PictureName[ ] property specifies an indexed array of files containing the pictures used in the control. You can add pictures to the array in the painter, or use the AddPicture function at execution. However, adding or deleting pictures during execution does not update the PictureName property array.
The pictures can be in the following formats:
bitmap (.BMP)
GIF (.GIF)
JPEG (.JPG or .JPEG)
icon (.ICO)
To add pictures to the PictureName array:
Select the Pictures tab page from the control’s Properties view.
Do one of the following:
In the rows provided in the Picture Name field, type the complete path and name of the files containing the desired pictures.
Use the Browse button.
Select one or more pictures from the Stock Pictures list.
The PictureName property array is populated at initialization and cannot be updated during execution.
The following example adds a picture to a TreeView control and associates it with a new TreeView item:
long ll_tvi
integer li_pic
li_pic = tv_1.AddPicture("c:\images\new.gif")
ll_tvi = tv_1.FindItem(RootTreeItem!, 0)
tv_1.InsertItemFirst(ll_tvi, "New", li_picture)