EndLabelEdit event
The EndLabelEdit event has different arguments for
different objects:
|
Object |
See |
|---|---|
|
ListView control |
|
|
TreeView control |
Syntax 1 For ListView controls
Description
Occurs when the user finishes editing an item’s label.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_lvnendlabeledit |
ListView |
Parameters
|
Argument |
Description |
|---|---|
|
index |
Integer. The index |
|
newlabel |
The string that represents the new label |
Return Values
Long. Return code choices (specify in
a RETURN statement):
-
0 Allow the
new text to become the item’s label. -
1 Prevent the new text from becoming the
item’s label.
Usage
The user triggers this event by pressing Enter or Tab after
editing the text.
Examples
This example displays the old label and the new label
in a SingleLineEdit:
|
1 |
ListViewItem lvi |
|
1 |
sle_info.text = "Finished editing " & |
|
1 |
   + String(lvi.label) & |
|
1 |
   +". Item changed to "+ String(newlabel) |
See Also
Syntax 2 For TreeView controls
Description
Occurs when the user finishes editing an item’s label.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_tvnendlabeledit |
TreeView |
Parameters
|
Argument |
Description |
|---|---|
|
handle |
Integer. The index |
|
newtext |
The string that represents the new label |
Return Values
Long. Return code choices (specify in
a RETURN statement):
-
0 Allow the
new text to become the item’s label -
1 Prevent the new text from becoming the
item’s label
Usage
The user triggers this event by pressing Enter or Tab after
editing the text.
Examples
This example displays the old label and the new label
in a SingleLineEdit:
|
1 |
TreeViewItem tvi |
|
1 |
|
1 |
This.GetItem(handle, tvi) |
|
1 |
sle_info.Text = "Finished editing " & |
|
1 |
   + String(tvi.Label) & |
|
1 |
   + ". Item changed to " & |
|
1 |
   + String(newtext) |