DeleteItem

The DeleteItem event has different arguments for different objects:

Object

See

ListView control

Syntax 1 For ListView controls

TreeView control

Syntax 2 For TreeView controls


Syntax 1 For ListView controls

Description

Occurs when an item is deleted.

Event ID

Event ID

Objects

pbm_lvndeleteitem

ListView

Arguments

Argument

Description

index

Integer by value (the index of the deleted item)

Returns

Long. Return code choices (specify in a RETURN statement):

Examples

Example 1

This example for the DeleteItem event displays a message with the number of the deleted item:

MessageBox("Message", "Item " + String(index) &

   + " deleted.")

See also


Syntax 2 For TreeView controls

Description

Occurs when an item is deleted.

Event ID

Event ID

Objects

pbm_tvndeleteitem

TreeView

Arguments

Argument

Description

handle

Long by value (the handle of the deleted item)

Returns

Long. Return code choices (specify in a RETURN statement):

Examples

Example 2

This example displays the name of the deleted item in a message:

TreeViewItem ll_tvi


This.GetItem(handle, ll_tvi)

MessageBox("Message", String(ll_tvi.Label) &

   + " has been deleted.")