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_TOGGLE

WIDGET_TOGGLE

WIDGET_TOGGLE

This function returns a compound widget used to create arrow toggle selections, and it returns the base ID of the widget. An interactive ENVI Classic session is required to run this function.

Syntax


Result = WIDGET_TOGGLE(Base [, /AUTO_MANAGE] [, DEFAULT=string], LIST=string array [, PROMPT=string], UVALUE=value [, XSIZE=value])

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.

DEFAULT (optional)

Use this keyword to specify the list item that is selected by default.

LIST

Use this keyword to specify a string array of items in the selection list.

PROMPT (optional)

Use this keyword to specify the prompt string to be used for the widget.

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.

XSIZE (optional)

Use this keyword to specify the width of the widget, in characters.

Example


Create a simple compound widget for displaying a toggle selection. Print the final toggle selection.

base = widget_auto_base(title='Toggle test')		
list = ['Item A', 'Item B', 'Item C']		
sb = widget_base(base, /row)		
wt = widget_toggle(sb, uvalue='toggle', list=list, /auto)
		result = auto_wid_mng(base)		if (result.accept eq 0) then return
		print, 'Toggle Selected', result.toggle

API Version


3.2



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