I put together the example below:
;------------------------------------------------------
; Example
;------------------------------------------------------
pro dj_widget_tab_wwindow_test_event, event
compile_opt idl2
;Dummy event handler.
end
pro dj_widget_tab_wwindow_test
compile_opt idl2
wtop = widget_base()
wtab = WIDGET_TAB(wtop, UNAME='wtab')
wbase1 = widget_base(wtab, title='Image')
w1 = widget_window(wbase1, UVALUE='w1')
wbase2 = widget_base(wtab, title='Plot')
w2 = widget_window(wbase2, UVALUE='w2')
state = hash()
state['w1'] = w1
state['w2'] = w2
;Relize the widget and set the state
widget_control, wtop, /REALIZE
widget_control, wtop, SET_UVALUE=state
widget_control,w1, GET_VALUE=ow1
ow1.select
img = image(/test, /CURRENT)
widget_control,w2, GET_VALUE=ow2
ow2.select
p = plot(/test, /current)
XMANAGER,'dj_widget_tab_wwindow_test', wtop, /NO_BLOCK
end
;----------------------------------------------------------
; End of example
;----------------------------------------------------------
I hope that is will be helpful
-David Starbuck
Harris Geospatial Solutions
|