GetObjectAtPointer method (DataWindows)
Description
Reports the control within the DataWindow object and row number
under the pointer. Controls include columns, labels, and other graphic
controls, such as lines and pictures.
Controls
|
DataWindow type |
Method applies to |
|---|---|
|
PowerBuilder |
DataWindow control |
|
Web ActiveX |
DataWindow control |
Syntax
[PowerBuilder]
|
1 |
string <span>dwcontrol</span>.<span>GetObjectAtPointer</span> ( ) |
[Web ActiveX]
|
1 |
string <span>dwcontrol</span>.<span>GetObjectAtPointer</span> ( ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to a DataWindow control |
Return Values
Returns the string whose value is the name of the control
under the pointer, followed by a tab character and the row number.
Returns the empty string (“”) if an error occurs.
If dwcontrol is null, in PowerBuilder
and JavaScript the method returns null.
Usage
If the object doesn’t have a name, neither a name
nor a row is reported. Since PowerBuilder 7, the painter gives names
to all controls. In earlier versions, only columns and column labels
got default names in the DataWindow painter and you could name other
controls yourself.
You can parse the return value by searching for the tab character
(ASCII 09). In PowerBuilder, search for ~t. For an example that
parses a string that includes a tab, see GetValue.
For information on the rows associated with
bands and therefore with controls in those bands, see GetBandAtPointer.
Examples
These statements obtain the name of the control under
the pointer in the DataWindow dw_emp:
|
1 |
String dwobjectname |
|
1 |
dwobjectname = dw_emp.<span>GetObjectAtPointer</span>() |
Some possible return values are:
|
Return value |
Meaning |
|---|---|
|
salary~t23 |
The control named salary in row 23. |
|
salary_h~t15 |
The control named salary_h, |