U_CREATESB

Create a scroll bar window

 

USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall U_CREATESB(scroll_id, name, size, [type][, endpoints])

scroll_id

Returned with the ID of the scroll bar window created. (n)

name

The name of the scroll bar window (a maximum of 15 characters). (a)

size

The length or height of the scroll bar. (n)

type

(optional) The type of scroll bar window to create: D_VERTICAL (default) or D_HORIZONTAL (n)

endpoints

(optional) A flag that specifies whether or not endpoint indicators should be displayed: D_ENDPOINTS (default) or D_NOENDPOINTS. (n)

U_CREATESB creates a scroll bar window in Unix and OpenVMS environments. A scroll bar window is one character wide if vertical, one character high if horizontal. (This routine does work on Windows, but the results are non-standard.)

Endpoints are single-character indicators at either end of the scroll bar which indicate whether or not further progress in that direction is possible. These characters, along with the character for the background fill for the scroll bar, can be changed with the U_CHARSB subroutine.

A scroll bar window indicates progress and regress with the movement of an indicator (through the window’s display area). For example, if you use a scroll bar with a list, the entire scroll bar represents the whole list; the location of the indicator within the scroll bar area represents the location of the current item relative to the list.

As you move through the list, you would update the scroll bar to represent the relative movement through the list using U_UPDATESB. Upon creation, the indicator is not placed within the scroll bar. U_UPDATESB must be called to place the indicator.

By default, U_CREATESB creates scroll bar windows without borders, but you can change this by calling W_BRDR.

U_CREATESB automatically logs the scroll bar window to the current environment.

If you pass a null string (“ ”) for name, Toolkit assigns a unique window name in the form _W_nnn, where nnn is the window ID.

A scroll bar window is deleted when the environment in which it was created is exited using the E_EXIT subroutine. To place, remove, and explicitly delete a scroll bar, use U_WINDOW.

The following example creates a vertical scroll bar window “vscroll,” which is 10 characters tall, and has no endpoint indicators.

xcall u_createsb(scrlid, "vscroll", 10,, D_NOENDPOINTS)