PRO cursor_test

widget_control, hourglass=1

for i = 0,1000 do begin
print,i
endfor

widget_control, hourglass=0

window,0
plot,[0,1],[0,1]

point = dialog_message('Pick a point on the plot?',/QUESTION)
if (point eq 'Yes') then begin
	cursor,x,y,/up
	oplot,[x],[y],psym=1
endif

wid_test

print,'Continue processing...'

END

;----

PRO wid_test_event,ev

WIDGET_CONTROL, ev.id, GET_UVALUE=uval

if (uval eq 'SUBMIT') then WIDGET_CONTROL, ev.top, /DESTROY

END

PRO wid_test

base = WIDGET_BASE(/COLUMN)
info = WIDGET_LABEL(base,VALUE='Imagine this is info. you must select to continue processing')
submit = WIDGET_BUTTON(base,VALUE='SUBMIT',UVALUE='SUBMIT')

WIDGET_CONTROL, base, /REALIZE
XMANAGER, 'wid_test', base

END

