I really don't know what was wrong, the code is so simple, but after I pushed the button, nothing happend
Pro OnPressBrowse, Event
test = DIALOG_PICKFILE()
print,'-------------------'
end
Pro simp_widg
base = widget_base(XSIZE = 800, YSIZE =600, TITLE='A Simple Example')
Textbox1 = widget_text(base,/SENSITIVE,XSIZE=80, XOffset=20, YOffset=40,value='select a file')
button =widget_button(base, XSize=60, YSize=40,Xoffset=550, Yoffset=40, value='browse',EVENT_PRO='OnPressBrowse')
widget_control, base, /REALIZE
end
|