scrollBars

Type: Integer

Availability: Read or write at any time

The scrollBars property of the Form class determines whether an object has horizontal or vertical scroll bars.

The scrollBars property of the JadeRichText control determines whether an object has horizontal or vertical scroll bars.

The settings of the scrollBars property are listed in the following table.

Window Class Constant Value Description
ScrollBars_None 0 None (the default)
ScrollBars_Horizontal 1 Horizontal
ScrollBars_Vertical 2 Vertical
ScrollBars_Both 3 Both

Scroll bars are displayed on an object (except for picture boxes, text boxes, and non-MDI forms that are always present) only if the contents of the object extend beyond the borders of the object. For example, in an MDI form, if part of a child form is hidden behind the border of the parent MDI form, a horizontal scroll bar is displayed.

Similarly, a vertical scroll bar is displayed on a Table when it cannot display all of its rows. If the scrollBars property is set to ScrollBars_None (0), the object does not have scroll bars, regardless of its contents.

For the ListBox and Table control classes only, the Window class provides the constants listed in the following table.

Windows Class Constant Integer Description
ScrollBars_PermanentHorizontal 4 Horizontal scroll bar is always shown
ScrollBars_PermanentVertical 5 Vertical scroll bar is always shown
ScrollBars_PermanentBoth 6 Both horizontal and vertical scroll bars are always shown
ScrollBars_HorzPermanentVert 7 Horizontal scroll bar is shown only if required and the vertical scroll bar is always shown
ScrollBars_VertPermanentHorz 8 Vertical scroll bar is shown only if required and the horizontal scroll bar is always shown

These constants enable you to define scroll bars for list boxes and tables that are permanently shown, regardless of whether they are needed or not. If a scroll bar on a list box or table control does not have a scroll range because there are insufficient entries, the scroll bar will be shown as disabled.

Any control that is aligned to its parent by using the alignContainer or alignChildren property will not scroll and that control will remain in place in its parent when the scroll bar of the parent is shifted. Dock control and status lines, for example, therefore remain visible and unchanged when the scroll bar of the parent is adjusted.

This property has no effect on scroll bars on MDI client windows. Scroll bars are drawn on an MDI client window if it is positioned within the MDI frame so that scroll bars are required, and these cannot be hidden. Scroll bars can be displayed or hidden only on the MDI frame form and the MDI child windows that the MDI client contains.

For a TextBox control, if a horizontal scroll bar is set, the scrollHorizontal property is automatically set to true. Similarly, a vertical scroll bar causes the scrollVertical property to be set to true.

For JadeRichText controls, scroll bars are not visible unless text extends beyond the control client window co-ordinates.