PointerX PowerScript function
Description
Determines the distance of the pointer from the left edge
of the specified object.
Controls
Any object or control
Syntax
1 |
<span>objectname</span>.<span>PointerX</span> ( ) |
Argument |
Description |
---|---|
objectname |
The name of the control or window for |
Return Values
Integer. Returns the pointer’s
distance from the left edge of objectname in PowerBuilder
units if it succeeds and -1 if an error occurs.
Examples
In a script for a control in a window, the following
example stores the distance of the pointer from the edge of the
window in the variable li_dist. If
the pointer is 5 units from the left edge of the window, li_dist equals
5:
1 |
integer li_dist |
1 |
li_dist = Parent.<span>PointerX</span>() |
This statement in a control’s RButtonDown
script displays a pop-up menu m_Appl.M_Help at
the cursor position:
1 |
m_Appl.m_Help.PopMenu(Parent.<span>PointerX</span>(), & |
1 |
   Parent.PointerY()) |
If the previous example was part of the window’s
RButtonDown script, instead of a control in the window, the following
statement displays the pop-up menu at the cursor position:
1 |
m_Appl.m_Help.PopMenu(This.<span>PointerX</span>(), & |
1 |
   This.PointerY()) |