ScrollHorizontal

Description

Occurs when user scrolls left or right in the DataWindow with the tab or arrow keys or the scroll bar.

PowerBuilder event information Event ID: pbm_dwnhscroll

Argument

Description

scrollpos

Long by value. The distance in PowerBuilder units of the scroll box from the left end of the scroll bar (if the DataWindow is split, in the pane being scrolled).

pane

Integer by value. The number of the pane being scrolled. (When the DataWindow is split with two scroll bars, there are two panes.) Values are:

  • 1 – The left pane (if the scroll bar is not split, the only pane).

  • 2 – The right pane.

Web ActiveX event information Event name: onScrollHorizontal

Argument

Description

Position

Number. The distance in PowerBuilder units of the scroll box from the left end of the scroll bar (if the DataWindow is split, in the pane being scrolled).

Pane

Number. The number of the pane being scrolled (when the DataWindow is split with two scroll bars, there are two panes). Values are:

  • 1 – The left pane (if the scroll bar is not split, the only pane).

  • 2 – The right pane.

Returns

There are no special outcomes for this event. The only code is:

Examples

Example 1

This example displays the customer ID of the current row (the cust_id column) in a SingleLineEdit control when the pane being scrolled is pane 1 and the position is greater than 100:

string ls_id

ls_id = ""

IF pane = 1 THEN

   IF scrollpos > 100 THEN

		ls_id = 	String(dw_1.Object.Id[dw_1.GetRow()])

	END If

END IF

sle_message.Text = ls_id

RETURN 0

See also