Re: Making a user interface

*To*: mathgroup at smc.vnet.net*Subject*: [mg99452] Re: Making a user interface*From*: dh <dh at metrohm.com>*Date*: Wed, 6 May 2009 05:22:15 -0400 (EDT)*References*: <gtp18u$jme$1@smc.vnet.net>

Hi Jason, here is a small example that lets you input 2 numbers and calculates the sum when you press a button: ======================================== x1 = 1; x2 = 2; x3 = 3; Panel@Column[{Row[{ "First Number=", InputField[Dynamic[x1], Number, FieldSize -> Small], " Second Number=", InputField[Dynamic[x2], Number, FieldSize -> Small] }], Row[{"Sum =", InputField[Dynamic[x3], Enabled -> False]}], Button["Calculate", x3 = x1 + x2] }] ========================================== Daniel Jason wrote: > I have written a program in mathematica that will do a set of calculations based on a set of parameters provided, and I'd like to make it as easy as possible for others to use it. > > What I'd like ideally is for there to be a set of input fields, little white boxes on a colored background for example, for the user to put the values of the parameters. Then they press a button and the calculations proceed, at the end of which graphs pop up and data files are exported. > > I have used Manipulate, but in this case the calculations are intensive and take many hours, so I don't want it to try and dynamically update the results when new fields are entered - only when the button is pressed. > > Thanks >