UnitsPerColumn

Applies to

Windows and user objects

Description

UnitsPerColumn specifies the number of PowerBuilder units you want to scroll right or left when the user clicks the left or right arrow in the horizontal scroll bar in a window or user object. The default is 0 (1/100 of the width of the window or user object). PowerBuilder controls horizontal scrolling automatically when Units Per Column is 0.

PowerBuilder multiplies Units Per Column by Columns Per Page to determine the number of PowerBuilder units to scroll the window horizontally when the user clicks in the scroll bar.

For information on calculating ColumnsPerPage and UnitsPerColumn, see Scrolling in windows and user objects.

Usage note

To control the vertical scroll bar in a window or user object, use the UnitsPerLine and LinesPerPage properties.

Usage

In a painter

To specify the UnitsPerColumn property:

  • Enter the desired number of PowerBuilder units in the UnitsPerColumn field on the Scroll tab page of the window's Properties view.

In scripts

The UnitsPerColumn property takes an integer value.

The following statement sets Units Per Column to 12, which is appropriate for a content width of 1650:

This.UnitsPerColumn = 12