DoubleClicked
event (DataWindows)
Description
Occurs when the user double-clicks in a DataWindow control.
PowerBuilder event
information
Event ID: pbm_dwnlbuttondblclk
|
Argument |
Description |
|---|---|
|
xpos |
Integer by value. The distance of the pointer from |
|
ypos |
Integer by value. The distance of the pointer from |
|
row |
Long by value. The number of the row the user If the user did not double-click on a |
|
dwo |
DWObject by value. A reference to the control within |
Return Values
There are no special outcomes for this event. The only code
is:
0 — Continue processing
Usage
The dwo, Name, or DWObject argument provides easy access to the
control the user clicks. You do not need to know the coordinates of
elements within the DataWindow to program control-specific responses to
the user’s clicks. For example, you can prevent editing of a column and
use the Clicked event to set data or properties for the column and row the
user clicks.
PowerBuilder programming note
The xpos and ypos arguments provide the same values the functions
PointerX and PointerY return when you call them for the DataWindow
control.
Examples
This example displays a message box reporting the row and column
clicked and the position of the pointer relative to the upper-left corner
of the DataWindow control:
|
1 2 3 4 5 6 7 8 9 10 11 |
string ls_columnname IF dwo.Type = "column" THEN ls_columnname = dwo.Name END IF MessageBox("DoubleClicked Event", & "Row number: " + row & + "~rColumn name: " + ls_columnname & + "~rDistance from top of dw: " + ypos & + "~rDistance from left side of dw: " + xpos) |
See also