BeginLabelEdit

The BeginLabelEdit 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 the user clicks on the label of an item after selecting the item.

Event ID

Event ID

Objects

pbm_lvnbeginlabeledit

ListView

Arguments

Argument

Description

index

Integer by value (the index of the selected ListView item)

Returns

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

Usage

When editing is allowed, a box appears around the label with the text highlighted. The user can replace or change the existing text.

Examples

Example 1

This example uses the BeginLabelEdit event to display the name of the ListView item being edited:

ListViewItem lvi

This.GetItem(index lvi)

sle_info.text = "Editing " + string(lvi.label)

See also


Syntax 2 For TreeView controls

Description

Occurs when the user clicks on the label of an item after selecting the item.

Event ID

Event ID

Objects

pbm_tvnbeginlabeledit

TreeView

Arguments

Argument

Description

handle

Long by value (the handle of the selected TreeView item)

Returns

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

Usage

When editing is allowed, a box appears around the label with the text highlighted. The user can replace or change the existing text.

Examples

Example 2

This example uses the BeginLabelEdit to display the name of the TreeView item being edited in a SingleLineEdit:

TreeViewItem tvi

This.GetItem(index, tvi)

sle_info.text = "Editing " + string(tvi.label)

See also