DeletePicture

Description

Deletes a picture from the image list.

Applies to

PictureListBox, DropDownPictureListBox, and TreeView controls

Syntax

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


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs.

Usage

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.

Examples

This example deletes the sixth image from the image list:

tv_list.DeletePicture(6)

See also

AddPicture

DeletePictures