The BeginLabelEdit event has different arguments for different objects:
Object |
See |
---|---|
ListView control |
|
TreeView control |
Occurs when the user clicks on the label of an item after selecting the item.
Event ID |
Objects |
---|---|
pbm_lvnbeginlabeledit |
ListView |
Argument |
Description |
---|---|
index |
Integer by value (the index of the selected ListView item) |
Long. Return code choices (specify in a RETURN statement):
0 Allow editing of the label
1 Prevent editing of the label
When editing is allowed, a box appears around the label with the text highlighted. The user can replace or change the existing text.
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)
Occurs when the user clicks on the label of an item after selecting the item.
Event ID |
Objects |
---|---|
pbm_tvnbeginlabeledit |
TreeView |
Argument |
Description |
---|---|
handle |
Long by value (the handle of the selected TreeView item) |
Long. Return code choices (specify in a RETURN statement):
0 Allow editing of the label
1 Prevent editing of the label
When editing is allowed, a box appears around the label with the text highlighted. The user can replace or change the existing text.
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)