comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » re-create a widget
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
re-create a widget [message #70117] Wed, 10 March 2010 09:30
titan is currently offline  titan
Messages: 59
Registered: March 2006
Member
Hi all,
I'm trying to write a simple widget which permits to insert 2 values
and check if the min value is less than the max value. If not a
message error appears. My problem is that once the "quit" button of
this error message is pressed I'm not able to re-open the first widget
in order to correct the values inserted.
How can I handle this aspect?

thanks

here you can find the code:

PRO quit_button_event, event
WIDGET_CONTROL,event.top,/DESTROY ;
END

input_param = WIDGET_AUTO_BASE(title='Input data range')

p1 = WIDGET_PARAM(input_param, /auto_manage, dt=4, field=3,
DEFAULT='7.5',$
prompt='minimum std dev of heights value',
uvalue='p1')

p2 = WIDGET_PARAM(input_param, /auto_manage, dt=4, field=3,
DEFAULT='4.5',$
prompt='maximum std dev of heights value',
uvalue='p2')
result=AUTO_WID_MNG(input_param)
IF (result.accept eq 0) THEN return

min_val = result.p1
max_val = result.p2

IF (min_val GT max_val) THEN BEGIN
base_err = WIDGET_BASE(TITLE = 'INPUT ERROR info', XSIZE = 500, /
COLUMN, XOFFSET=500, YOFFSET=300)
row_err = WIDGET_BASE(base_err, /ROW,/FRAME)
err_label = WIDGET_LABEL(row_err,VALUE='ERROR MESSAGE ',/
DYNAMIC_RESIZE)
err_msg = widget_TEXT(row_err,VALUE='Please check if the
maximum/minimum order inserted is correct',XSIZE=60)
row_quit_button = WIDGET_BASE(base_err, /ROW,/FRAME, /
ALIGN_CENTER)
quit_button= WIDGET_BUTTON(row_quit_button, VALUE='QUIT',
UVALUE='Quit', XSIZE = 100,/ALIGN_CENTER)
WIDGET_CONTROL, base_err, /REALIZE
XMANAGER, 'wid_err',
base_err,event_handler='quit_button_event'
ENDIF
end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Interpolation of missing data
Next Topic: how to display on the unix system

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 16:15:23 PDT 2025

Total time taken to generate the page: 6.80060 seconds