>  Docs Center  >  ENVI API  >  ENVI Classic Display  >  WIDGET_SLABEL



This function returns a widget used to display a string message with scroll bars. It is essentially a multi-line label widget that cannot be auto-managed on its own. You typically combine this widget with a compound widget that is auto-managed. The function returns the base ID of the widget, and an interactive ENVI Classic session is required to run it.


Result = WIDGET_SLABEL(Base [, /FRAME], PROMPT=string [, XSIZE=value] [, YSIZE=value])



This is the ID of the base widget.


FRAME (optional)

Set this keyword to create a frame around the widget.


Use this keyword to specify the text to display.

XSIZE (optional)

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

YSIZE (optional)

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

Widget Event

This is a passive widget that does not generate events.


The following example creates the widget shown in the above description.

base = widget_auto_base(title='WIDGET_SLABEL')
ws = widget_slabel(base, prompt='This is a text message.')
widget_control, base, /realize

However, instead of creating a standalone widget with a text message, you typically combine WIDGET_SLABEL with another compound widget that is auto-managed. Following is an example of combining WIDGET_SLABEL with WIDGET_STRING.

base = widget_auto_base(title='Edit String')
ws = widget_string(base, uvalue='str', /auto)
wss = widget_slabel(base, $
   prompt='This is the WIDGET_SLABEL text message')
result = auto_wid_mng(base)

Following is the resulting widget:

API Version


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