MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Making a user interface

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99459] Re: Making a user interface
  • From: ragfield <ragfield at gmail.com>
  • Date: Wed, 6 May 2009 05:23:33 -0400 (EDT)
  • References: <gtp18u$jme$1@smc.vnet.net>

On May 5, 4:35 am, Jason <jbig... at uoregon.edu> wrote:
> I have written a program in mathematica that will do a set of calculation=
s 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 wh=
ite boxes on a colored background for example, for the user to put the valu=
es 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 a=
nd take many hours, so I don't want it to try and dynamically update the re=
sults when new fields are entered - only when the button is pressed.  

Deploy@Style[
  DynamicModule[{input1 = 5, input2 = 23, result = 0}, Grid[{
     {"Input 1:", InputField[Dynamic[input1], Number]},
     {"Input 2:", InputField[Dynamic[input2], Number]},
     {Button["Evaluate", Pause[input1]; result = input2,
       Method -> "Queued"], \[SpanFromLeft]},
     {"Result:", Dynamic[result]}
     }]], FontFamily -> CurrentValue["ControlsFontFamily"]]

-Rob


  • Prev by Date: Re: defining consecutive variables
  • Next by Date: Re: Making a user interface
  • Previous by thread: Making a user interface
  • Next by thread: Re: Making a user interface