RightClicked event
The RightClicked event has different arguments for
different objects:
|
Object |
See |
|---|---|
|
ListView and Tab control |
|
|
TreeView control |
Syntax 1 For ListView and Tab controls
Description
Occurs when the user clicks the right mouse button on the
ListView control or the tab portion of the Tab control.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_lvnrclicked |
ListView |
|
pbm_tcnrclicked |
Tab |
Parameters
|
Argument |
Description |
|---|---|
|
index |
Integer by value |
Return Values
Long. Return code choices (specify in
a RETURN statement):
-
0 Continue
processing
Usage
When the user clicks in the display area of the Tab control,
the tab page user object gets an RButtonDown event rather than a
RightClicked event for the Tab control.
Examples
This example for the RightClicked event of a ListView
control displays a pop-up menu when the user clicks the right mouse
button:
|
1 |
// Declare a menu variable of type m_main<br>m_main m_lv_popmenu<br>// Create an instance of the menu variable<br>m_lv_popmenu = CREATE m_main<br>// Display menu at pointerposition<br>m_lv_popmenu.m_entry.PopMenu(Parent.PointerX(), &<br>   Parent.PointerY()) |
See Also
Syntax 2 For TreeView controls
Description
Occurs when the user clicks the right mouse button on the
TreeView control.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_tvnrclicked |
TreeView |
Parameters
|
Argument |
Description |
|---|---|
|
handle |
Long by value (the |
Return Values
Long. Return code choices (specify in
a RETURN statement):
-
0 Continue
processing
Examples
This example for the RightClicked event of a TreeView
control displays a pop–up menu when the user clicks the
right mouse button:
|
1 |
// Declare a menu variable of type m_main |
|
1 |
m_main m_tv_popmenu |
|
1 |
|
1 |
// Create an instance of the menu variable |
|
1 |
m_tv_popmenu = CREATE m_main |
|
1 |
|
1 |
// Display menu at pointer position |
|
1 |
m_tv_popmenu.m_entry.PopMenu(Parent.PointerX(), & |
|
1 |
   Parent.PointerY()) |