This question is answered in the Online Help article "Managing Application State" in the following IDL 7.0 documentation path 'IDL Programmers' Guides > User Interface Programming > Creating Widget Applications > Managing Application State'. There you will learn that you can hove code like the following in your widget creation routine:
state = {wdraw:wDraw, wbutton:wButton, some_data:myData, debug_key:debug}
widget_control, tlb, SET_UVALUE=statewhich can subsequently be acquired in the event handler with code like the following:
widget_control, event.top, GET_UVALUE=state
if state.debug eq 1 then ...James Jones
|