CW_FSLIDER

The CW_FSLIDER function creates a slider that selects floating-point values.

The returned value of this function is the widget ID of the newly-created slider widget.

This routine is written in the IDL language. Its source code can be found in the file cw_fslider.pro in the lib subdirectory of the IDL distribution.

Using CW_FSLIDER

To get or set the value of a CW_FSLIDER widget, use the GET_VALUE and SET_VALUE keywords to WIDGET_CONTROL.

Calling Sequence

Result = CW_FSLIDER( Parent )

Arguments

Parent

The widget ID of the parent widget.

Keywords

DRAG

Set this keyword to zero if events should only be generated when the mouse is released. If DRAG is non-zero, events will be generated continuously when the slider is adjusted. Note: On slow systems, /DRAG performance can be inadequate. The default is DRAG = 0.

EDIT

Set this keyword to make the slider label be editable. The default is EDIT = 0.

FORMAT

Provides the format in which the slider value is displayed. This should be a format as accepted by the STRING procedure. The default FORMAT is '(G13.6)'

FRAME

Set this keyword to have a frame drawn around the widget. The default is FRAME = 0.

MAXIMUM

The maximum value of the slider. The default is MAXIMUM = 100.

MINIMUM

The minimum value of the slider. The default is MINIMUM = 0.

SCROLL

Under the Motif window manager, the value provided for SCROLL specifies how many units the scroll bar should move when the user clicks the left mouse button inside the slider area, but not on the slider itself. This keyword has no effect under other window systems.

SUPPRESS_VALUE

If true, the current slider value is not displayed. The default is SUPPRESS_VALUE = 0.

TITLE

The title of slider.

UVALUE

The "user value" to be assigned to the widget.

VALUE

The initial value of the slider

VERTICAL

If set, the slider will be oriented vertically. The default is horizontal.

XSIZE

For horizontal sliders, sets the length.

YSIZE

For vertical sliders, sets the height.

Keywords to WIDGET_CONTROL and WIDGET_INFO

The widget ID returned by most compound widgets is actually the ID of the compound widget's base widget. This means that many keywords to the WIDGET_CONTROL and WIDGET_INFO routines that affect or return information on base widgets can be used with compound widgets.

In addition, you can use the GET_VALUE and SET_VALUE keywords to WIDGET_CONTROL to obtain or set the value of the slider. Note that the SET_SLIDER_MAX and SET_SLIDER_MIN keywords to WIDGET_CONTROL and the SLIDER_MIN_MAX keyword to WIDGET_INFO do not work with floating point sliders created with CW_FSLIDER.

See Compound Widgets for a more complete discussion of controlling compound widgets using WIDGET_CONTROL and WIDGET_INFO .

Widget Events Returned by the CW_FSLIDER Widget

This widget generates event structures with the following definition:

Event = { ID:0L, TOP:0L, HANDLER:0L, VALUE:0.0, DRAG:0}

The VALUE field is the floating-point value selected by the slider. The DRAG field reports on whether events are generated continuously (when the DRAG keyword is set) or only when the mouse button is released (the default).

See Also

WIDGET_SLIDER