accept eq 0) then return print, 'Menu Item Selected= ', list(result.
#Using pmenu pro
PRO ENVI_WIDGET_PMENU_EX compile_opt IDL2 base = widget_auto_base(title= 'Menu test') list = we = widget_pmenu(base, list=list, uvalue= 'menu', /auto) result = auto_wid_mng(base) if (result. When you click OK, print the selected menu item. ExampleĬreate a simple compound widget with a drop-down list.
When the widget is not auto-managed, widget events set event.result to the index of the selected menu item. Use this keyword to specify the width of the widget, in characters. You must set UVALUE for all compound widgets.
For user-managed widgets, you can set and use UVALUE however you wish. For widgets managed by the ENVI Classic function AUTO_WID_MNG, UVALUE is a tag name in the returned anonymous structure. The user value exists entirely for your convenience. This value may be of any data type and organization. Use this keyword to assign a “user value” to the widget. Use this keyword to specify the prompt string to be used for the widget. Use this keyword to specify an array of values associated with each menu item. For the best results, pad list items with spaces to make all items equal in length. Use this keyword to specify a string array of drop-down list items. Use this keyword to specify the index entry of the default menu selection. The Feed Me menu is offered in 3 or 4 courses, featuring Chefs choice of. Do not use this keyword for user-managed widgets. At Cochon, Chef Donald Link has reconnected with his culinary roots. Setting this keyword to 0 does not require a value. Setting this keyword to a value of 1 requires that the widget has either a default value or a value that you enter. The keyword value specifies if the widget must have a defined value. Use this keyword to specify how ENVI Classic auto-manages the widget with AUTO_WID_MNG. Result = WIDGET_PMENU( Base, LIST= string array, UVALUE= value ) Arguments
The function returns the base ID of the widget, and an interactive ENVI Classic session is required to run it. This function returns a compound widget that displays a drop-down list.