Hi all,
In advance, thanks for all the wonderful help that everyone always
passes my way.
I've started to venture into using CW_FORM to make quick forms for a
program I am writing. I think I have it almost done. I have a couple
of problems that I need to fix first though.
I have two text fields into which I want to place values that the user
can edit if they desire. Have placed the SET_VALUE keywords in, but am
still not getting any values printed there! Any ideas (have posted the
SHORT code at the end of this post).
Also if anyone could help on getting my checkboxes to line up that
would be great too.
Thanks
Lloyd Watkin
-----------------------------------------
pro test3
max_step = 1.0e-1
min_step = 1.0e-9
desc = [ $
'0, LABEL, Choose which species to vary:, CENTER', $
'1, BASE,, COLUMN=7, FRAME', $
'0, BUTTON, H2O|CO2|O3|N2O|CO|CH4|O2,' $
+ 'ROW, TAG=species1', $
'0, BUTTON, NO|SO2|NO2|NH3|HNO3|OH|HF,' $
+ 'ROW, TAG=species2', $
'0, BUTTON, HCl|HBr|HI|ClO|OCS|H2CO|HOCl,' $
+ 'ROW, TAG=species3', $
'0, BUTTON, N2|HCN|CH3Cl|H2O2|C2H2|C2H6|PH3,' $
+ 'ROW, TAG=species4', $
'0, BUTTON, COF2|SF6|H2S|HCOOH|HO2|O|ClONO2,' $
+ 'ROW, TAG=species5', $
'0, BUTTON, NO+|HOBr|C2H4|CH3OH,width=200,' $
+ 'ROW, TAG=species6', $
'0, TEXT, , LABEL_LEFT=Maximum step size:,SET_VALUE=max_step,
WIDTH=20' $
+ 'TAG=maxstep', $
'0, INTEGER, 0, LABEL_LEFT=Minimum step size:,SET_VALUE=min_step,
WIDTH=20, TAG=minstep', $
'1, BASE,, ROW', $
'0, BUTTON, OK, QUIT,CENTER,' $
+ 'TAG=OK', $
'2, BUTTON, Cancel, QUIT, CENTER']
a = CW_FORM(desc, /COLUMN)
;HELP, /STRUCTURE, a
if (a.ok EQ 0) then retall ;User has cancelled the fit
species = [a.species1,a.species2,a.species3,a.species4,a.species5,a.sp ecies6]
print, species
max_step = a.maxstep
min_step = a.minstep
print, minstep, maxstep
stop
end
|