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_STRING

WIDGET_STRING

WIDGET_STRING

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

Syntax


Result = WIDGET_STRING(Base [, /ALL_EVENTS] [, /AUTO_MANAGE] [, DEFAULT=string] [, PROMPT=string], UVALUE=value [, XSIZE=value])

Arguments


Base

This is the ID of the base widget.

Keywords


ALL_EVENTS (optional)

Set this keyword to specify that the widget generate an event for all supported events.

AUTO_MANAGE (optional)

Set this keyword to specify that the widget be managed by the ENVI Classic function AUTO_WID_MNG.

DEFAULT (optional)

Use this keyword to specify a default string.

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.

Widget Event


When the widget is not auto-managed, widget events set event.result to the entered string.

Example


Create a simple compound widget to enter a string value. Print this string.

PRO ENVI_WIDGET_AUTO_BASE_EX
  base = widget_auto_base(title='Edit String')
  ws = widget_string(base, uvalue='str', /auto)
  result = auto_wid_mng(base)
  if (result.accept eq 0) then return
  print, 'New String ', result.str
END

API Version


3.2



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