Syntax 2: For ListView and Toolbar controls
Description
Occurs when the user clicks within the ListView control, either on
an item or in the blank space around items.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_lvnclicked |
ListView |
Arguments
|
Argument |
Description |
|---|---|
|
index |
Integer by value (the index of the ListView item |
Return Values
Long.
Return code choices (specify in a RETURN statement):
0 — Continue processing
Usage
The Clicked event occurs when the user presses the mouse button.
The Clicked event can occur during a double-click, in addition to the
DoubleClicked event.
In addition to the Clicked event, ItemChanging and ItemChanged
events can occur when the user clicks on an item that does not already
have focus. BeginLabelEdit can occur when the user clicks on a label of
an item that has focus.
Using the ItemActivate event for ListView controls
You can use the ItemActivate event (with the OneClickActivate
property set to true) instead of the Clicked event for ListView
controls.
Examples
This code changes the label of the item the user clicks to
uppercase:
|
1 2 3 4 5 6 |
IF index = -1 THEN RETURN 0 This.GetItem(index, llvi_current) llvi_current.Label = Upper(llvi_current.Label) This.SetItem(index, llvi_current) RETURN 0 |
See also