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.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control |
Web ActiveX |
DataWindow control |
string dwcontrol.GetObjectAtPointer ( )
string dwcontrol.GetObjectAtPointer ( )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control |
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.
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.
These statements obtain the name of the control under the pointer in the DataWindow dw_emp:
String dwobjectname
dwobjectname = dw_emp.GetObjectAtPointer()
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, which is in the header. Row 15 is the first visible row below the header. |