Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  ENVI API  >  ENVI Classic Display  >  WIDGET_SSLIDER

WIDGET_SSLIDER

WIDGET_SSLIDER

This function returns a compound widget for setting values using a slider, and it returns the base ID of the widget. An interactive ENVI Classic session is required to run this function.

Syntax


Result = WIDGET_SSLIDER(Base [, AUTO_MANAGE={0 | 1}] [, CEIL=value] [, /DRAG] [, DT={1 | 2 | 3 | 4 | 5 | 6 | 9 | 12 | 13 | 14 | 15}] [, FIELD=integer] [, FLOOR=value] [, /INCHES], MAX=integer, MIN=integer, SCALE=integer, TITLE=string, UVALUE=value, VALUE=value [, XS=array])

Arguments


Base

This is the ID of the base widget.

Keywords


AUTO_MANAGE (optional)

Use this keyword to specify how ENVI Classic auto-manages the widget with AUTO_WID_MNG. The keyword value specifies if the widget must have a defined value. Setting this keyword to a value of 1 requires that the widget has either a default value or a value that you enter. Setting this keyword to 0 does not require a value. Do not use this keyword for user-managed widgets.

CEIL (optional)

Use this keyword to specify a maximum value allowed for input numbers. The returned value will always equal to or less than this number, even if the slider is positioned higher.

DRAG (optional)

Set this keyword to cause events to be generated continuously while the slider is being moved.

DT (optional)

This keyword indicates the IDL data type of the output data. Set the keyword to one of the following integer values:

  • 1: Byte (8 bits)
  • 2: Integer (16 bits)
  • 3: Long integer (32 bits)
  • 4: Floating-point (32 bits)
  • 5: Double-precision floating-point (64 bits)
  • 6: Complex (2x32 bits)
  • 9: Double-precision complex (2x64 bits)
  • 12: Unsigned integer (16 bits)
  • 13: Unsigned long integer (32 bits)
  • 14: Long 64-bit integer
  • 15: Unsigned long 64-bit integer

FIELD (optional)

Use this keyword to set the number of decimal places used to format numbers. This keyword has no effect unless DT=4 (floating point) or greater.

FLOOR (optional)

Use this keyword to set the minimum value allowed for input numbers. The returned value will always be equal to or greater than this number, even if the slider is positioned lower.

INCHES (optional)

Set this keyword to cause the slider to be annotated with the inch symbol (").

MAX

Use this keyword to specify an integer maximum for the slider. The value of MAX will be multiplied by the value of SCALE to arrive at the actual maximum slider value.

MIN

Use this keyword to specify an integer minimum for the slider. The value of MIN will be multiplied by the value of SCALE to arrive at the actual minimum slider value.

SCALE

Use this keyword to specify a multiplicative scale factor to use in conjunction with the MIN and MAX keywords. The default value is 1.

TITLE

Use this keyword to specify a title for the slider.

UVALUE

Use this keyword to assign a “user value” to the widget. This value may be of any data type and organization. The user value exists entirely for your convenience. For widgets managed by the ENVI Classic function AUTO_WID_MNG, UVALUE is a tag name in the returned anonymous structure. For user-managed widgets, you can set and use UVALUE however you wish. You must set UVALUE for all compound widgets.

VALUE

Use this keyword to set an initial slider value. The SCALE factor is not applied.

XS (optional)

Use this keyword to specify a two-element array, where the first element is the slider size in pixels, and the second element is the text input widget size in characters. The default array is [150, 7].

Widget Event


When the widget is not auto-managed, widget events set event.result to the slider value. This value is already scaled by the SCALE factor. The returned value is always double-precision and should be cast to your selected data type.

Example


Create a simple compound widget to select a value using a slider. Print the final slider location.

PRO ENVI_WIDGET_SSLIDER_EX
  compile_opt IDL2
  base = widget_auto_base(title='Simple Slider')
  wg = widget_sslider(base, title='Samples', min=0, max=10, $
  value=0, uvalue='slide', /auto)
  result = auto_wid_mng(base)
  if (result.accept eq 0)then return
  print, 'Slider value', result.slide
END

API Version


3.2



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us