The CW_FSLIDER function creates a slider that selects floating-point values.
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.
To get or set the value of a CW_FSLIDER widget, use the GET_VALUE and SET_VALUE keywords to WIDGET_CONTROL.
| Note |
Result = CW_FSLIDER( Parent [, /DOUBLE] [, /DRAG] [, /EDIT] [, FORMAT=string] [, /FRAME] [, MAXIMUM=value] [, MINIMUM=value] [, SCROLL=units] [, /SUPPRESS_VALUE] [, TAB_MODE=value] [, TITLE=string] [, UNAME=string] [, UVALUE=value] [, VALUE=initial_value] [, XSIZE=length | {, /VERTICAL [, YSIZE=height]}] )
This function returns the widget ID of the newly-created slider widget.
The widget ID of the parent widget.
Set this keyword to return double-precision values in the VALUE field of widget events generated by CW_FSLIDER. Explicitly set DOUBLE=0 to ensure that values returned in the VALUE field are single-precision. By default, CW_FSLIDER will return double-precision values if any of the values specified by the MINIMUM, MAXIMUM, or VALUE keywords is double-precision, or single-precision otherwise.
| Note |
Set this keyword to cause events to be generated continuously when the slider is adjusted. The default is DRAG=0, in which case events are generated only when the mouse is released. Note that on slow systems, /DRAG performance can be inadequate.
Set this keyword to make the slider label editable. The default is EDIT=0. If EDIT is set, the GET_VALUE keyword to WIDGET_CONTROL will return the value of the slider label if it has been changed.
| Note |
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)'
Set this keyword to have a frame drawn around the widget. The default is FRAME=0.
The maximum value of the slider. The default is MAXIMUM=100.
The minimum value of the slider. The default is MINIMUM=0.
Set the SCROLL keyword to a floating-point value specifying the number of floating-point units the scroll bar should move when the user clicks the left mouse button inside the slider area (Motif) or on the slider arrows (Windows), but not on the slider itself. The default on both platforms is 0.01 x (MAXIMUM - MINIMUM), which is 1% of the slider range.
If this keyword is set, the current slider value is not displayed.
Set this keyword to one of the values shown in the table below to determine how the widget hierarchy can be navigated using the Tab key. The TAB_MODE setting is inherited by lower-level bases and child widgets unless it is explicitly set on an individual widget.
| Note |
Valid settings are:
|
Value
|
Description
|
|---|---|
| 0 |
Disable navigation onto or off of the widget. This is the default. Child widgets automatically inherit the tab mode of the parent base as described in Inheriting the TAB_MODE Value.
|
| 1 |
Enable navigation onto and off of the widget.
|
| 2 |
Navigate only onto the widget.
|
| 3 |
Navigate only off of the widget.
|
| Note |
Set this keyword to a string defining the title of the slider.
| Note |
Set this keyword to a string that can be used to identify the widget in your code. You can associate a name with each widget in a specific hierarchy, and then use that name to query the widget hierarchy and get the correct widget ID.
To query the widget hierarchy, use the WIDGET_INFO function with the FIND_BY_UNAME keyword. The UNAME should be unique to the widget hierarchy because the FIND_BY_UNAME keyword returns the ID of the first widget with the specified name.
The "user value" to be assigned to the widget.
The initial value of the slider.
If set, the slider will be oriented vertically. The default is horizontal.
The length of horizontal sliders.
The height of vertical sliders.
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.
You can use the GET_VALUE and SET_VALUE keywords to WIDGET_CONTROL to obtain or set the value of the slider. In addition, you can use the SET_VALUE keyword to change the minimum and maximum values of the slider by setting the keyword equal to a three-element vector [value, min, max].
| Note |
See Compound Widgets for a more complete discussion of controlling compound widgets using WIDGET_CONTROL and WIDGET_INFO.
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).
Introduced: Pre 4.0
TAB_MODE keyword added: 6.1