Syntax 1 For editing a label in a ListView
Description
Puts a label in a ListView into edit mode.
Controls
ListView controls
Syntax
|
1 |
<span>listviewname</span><span>.EditLabel</span> ( <span>index</span> ) |
|
Argument |
Description |
|---|---|
|
listviewname |
The ListView control in which you want |
|
index |
The index of the ListView item to be |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs.
Usage
The EditLabels property for the ListView must be set to true to
enable editing of labels. When this property is true,
calling the EditLabel function sets focus on
the item and enables editing. To disable editing when the user has
finished editing the label, set the EditLabels property to false
in the EndLabelEdit event.
If the EditLabels property is set to false, the EditLabel function
does not enable editing.
Examples
This example allows the user to edit the label of
the first selected item in the ListView control lv_1:
|
1 |
integer li_selected<br>li_selected = lv_1.SelectedIndex()<br>lv_1.EditLabels = TRUE<br>lv_1.<span>EditLabel</span>(li_selected) |