Deletes a picture from the image list.
PictureListBox, DropDownPictureListBox, and TreeView controls
controlname.DeletePicture ( index )
Argument |
Description |
---|---|
controlname |
The control from which you want to delete a picture |
index |
The index number of the picture you want to delete from the TreeView control’s image list |
Integer. Returns 1 if it succeeds and -1 if an error occurs.
When you delete a picture from the image list for a control, all subsequent pictures in the list are renumbered to fill the gap. Because the picture index for an item does not change, the pictures for items that use the affected index numbers will change.
This example deletes the sixth image from the image list:
tv_list.DeletePicture(6)