Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter NineDialog Functions (continued)

SCROLLBAR Resource Statement

Overview

The SCROLLBAR statement can be used as part of the body of a dialog resource specification. It is a specific method of specifying a scrollbar. The control is a rectangle that contains a scroll box and has direction arrows at both ends.

Syntax/Parameters

Syntax

SCROLLBAR text, id, x, y, width, height, [style], [extended-style]

Parameters

id

The control identifier. This value must be a 16-bit unsigned integer in the range 0 through 65,535 or -1 (same as 0xFFFF or 65535). Except for -1, control identifiers must be unique. Duplicate control values for the same dialog page will result in an error. id is used to access the control within dialog procedures. A value of -1 is typically used for legends and other static controls and cannot be used for controls that require programmatic access.

x

The X coordinate in dialog units of the left side of the control relative to the left side of the dialog box. This value must be a 16-bit unsigned integer in the range 0 through 65,535. Use caution when overlaying controls.

y

The Y coordinate in dialog units of the top side of the control relative to the top of the dialog box. This value must be a 16-bit unsigned integer in the range 0 through 65,535. Use caution when overlaying controls.

width

The width of the control. This value must be a 16-bit unsigned integer in the range 1 through 65,535. The width is in 1/4-character units.

height

The height of the control. This value must be a 16-bit unsigned integer in the range 1 through 65,535. The height is in 1/8-character units.

style

An optional predefined name or literal integer value that specifies the style of the control. By default, the style is SBS_HORZ.

extended-style

An optional extended window style. The style parameter must be specified in order to specify extended-style. For more information, see EXSTYLE.

Remarks

Scrollbar controls allow the user to scroll a window. The control sends a notification message to its parent whenever the user clicks the mouse in the control. The parent is responsible for updating the window position. Scrollbars can be used in any position in the window and they can be used whenever content requires scrolling.