BeginLabelEdit event
The BeginLabelEdit event has different arguments for
different objects:
|
Object |
See |
|---|---|
|
ListView control |
|
|
TreeView control |
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 |
Parameters
|
Argument |
Description |
|---|---|
|
index |
Integer by value |
Return Values
Long. Return code choices (specify in
a RETURN statement):
-
0 Allow editing
of the label -
1 Prevent editing of the label
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
This example uses the BeginLabelEdit event to display
the name of the ListView item being edited:
|
1 |
ListViewItem lvi |
|
1 |
This.GetItem(index lvi) |
|
1 |
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 |
Parameters
|
Argument |
Description |
|---|---|
|
handle |
Long by value (the |
Return Values
Long. Return code choices (specify in
a RETURN statement):
-
0 Allow editing
of the label -
1 Prevent editing of the label
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
This example uses the BeginLabelEdit to display the
name of the TreeView item being edited in a SingleLineEdit:
|
1 |
TreeViewItem tvi |
|
1 |
This.GetItem(index, tvi) |
|
1 |
sle_info.text = "Editing " + string(tvi.label) |