SetRowFocusIndicator method (DataWindows)
Description
Specifies the visual indicator that identifies the current
row in the DataWindow control. You can use the standard dotted-line
rectangle of Windows, PowerBuilder’s pointing hand, or
an image stored in a PowerBuilder Picture control.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object |
Web ActiveX |
DataWindow control, DataWindowChild object |
Syntax
[PowerBuilder]
1 |
integer <span>dwcontrol</span>.<span>SetRowFocusIndicator</span> ( RowFocusInd <span>focusindicator </span><br> {, integer <span>xlocation</span> {, integer <span>ylocation</span> } } )<br>integer <span>dwcontrol</span>.<span>SetRowFocusIndicator</span> ( Picture <span>picturename </span> <br> {, integer <span>xlocation</span> {, integer <span>ylocation</span> } } ) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>SetRowFocusIndicator</span> ( number <span>focusindicator </span>,<br> number <span>xlocation</span>, number <span>ylocation</span> ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control or |
focusindicator or picturename |
The visual indicator for the current
For a list of valid enumerated datatype values, see RowFocusInd. |
xlocation |
The x coordinate in PowerBuilder units |
ylocation |
The y coordinate in PowerBuilder units |
Return Values
Returns 1 if it succeeds and –1 if an error occurs.
If any argument’s value is null, SetRowFocusIndicator returns
null.
Usage
Sets the current row indicator in dwcontrol to focusindicator.
If you select Hand or a Picture control as the indicator, PowerBuilder
displays the indicator at the left side of the body of the DataWindow
unless you specify location coordinates (xlocation, ylocation).
The default location is 0,0 (the left side of the body of the DataWindow
control).
You must assign a DataWindow object to the DataWindow control
before you call SetRowFocusIndicator. If you change the DataWindow
object at runtime, you must call SetRowFocusIndicator again to reset
the indicator.
To use a picture as the row focus indicator, set up the Picture
control in the Window painter. Place the Picture control in the
window that contains the DataWindow control and then reference it
in the SetRowFocusIndicator method. You can hide
the picture or place it under the DataWindow control so the user
does not see the control itself.
Examples
This statement sets the row focus indicator in dw_employee
to the pointing hand:
1 |
dw_employee.<span>SetRowFocusIndicator</span>(Hand!) |
If p_arrow is a Picture control in the window,
the following statement sets the row focus indicator in dw_employee
to p_arrow:
1 |
dw_employee.<span>SetRowFocusIndicator</span>(p_arrow) |