Next: Toggle Widgets Up: ScrolledWindow and ScrollBar Widgets Previous: ScrolledWindow Widgets

ScrollBar Widgets

You may have to create ScrollBars yourself (XmAPPLICATION_DEFINED scrolling policy) or you may get the ID of a ScrollBar form the code (e.g. XmNhorizontal resource).

To create a ScrollBar use XtVaCreateManagedWidget() with xmScrollBarWidgetClass or use XmCreateScrollBar().

You may wish to modify or set some ScrollBar resources:

XmNsliderSize
- a slider may divided up into unit lengths. This resource sets its size.
XmNmaximum
- the largest size (measured in unit lengths) a ScrollBar can have.
XmNminimum
- the smallest ScrollBar size.
XmNincrement
- the number of unit lengths the Scale will change when moved with mouse.
XmNorientation
- XmVERTICAL (Default) or XmHORIZONTAL.
XmNvalue
- the current position of the Scale.
XmNpageIncrement
- controls how much the underlying work window moves relative to a ScrollBar movement.

The Callback resources for a ScrollBar are:

XmNvalueChangedCallback
- if the ScrollBar value changes
XmNdecrementCallback, XmNincrementCallBack
- if the ScrollBar value changes down or up.
XmNdragCallback
- continuous Scale values.
XmNpageDecrementCallback, XmNpageIncrementCallback
- movement of work window.
XmNtoTopCallback, XmNtoBottomCallback
- if ScrollBar is moved to max/min values.


Dave.Marshall@cm.cf.ac.uk
Tue May 24 16:52:56 BST 1994