SetRow  SetSelfLink

Chapter 9: Methods for the DataWindow Control

SetRowFocusIndicator

Description

Specifies the visual indicator that identifies the current row in the DataWindow control. You can use the standard dotted-line rectangle of Windows, PocketBuilder’s pointing hand, or an image stored in a PocketBuilder Picture control.

Syntax

integer dwcontrol.SetRowFocusIndicator ( RowFocusInd focusindicator  {, integer xlocation {, integer ylocation } } )
integer dwcontrol.SetRowFocusIndicator ( Picture picturename  {, integer xlocation {, integer ylocation } } )

Argument

Description

dwcontrol

A reference to a DataWindow control or child DataWindow in which you want to set the row focus indicator.

focusindicator or picturename

The visual indicator for the current row. Valid values can be a value of the RowFocusInd enumerated datatype or the name of a Picture control whose image you want to use.

For a list of valid enumerated datatype values, see RowFocusInd.

xlocation (optional)

The x coordinate in PowerBuilder units of the position of the hand or bitmap relative to the upper-left corner of the row.

ylocation (optional)

The y coordinate in PowerBuilder units of the position of the hand or bitmap relative to the upper-left corner of the row.

Returns

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, PocketBuilder 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).

NotePictures as row focus indicators 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

Example 1

This statement sets the row focus indicator in dw_employee to the pointing hand:

dw_employee.SetRowFocusIndicator(Hand!)

Example 2

If p_arrow is a Picture control in the window, the following statement sets the row focus indicator in dw_employee to p_arrow:

dw_employee.SetRowFocusIndicator(p_arrow)

See also





Copyright © 2004. Sybase Inc. All rights reserved. SetSelfLink

View this book as PDF