Re: Re: Manipulate question
- To: mathgroup at smc.vnet.net
- Subject: [mg94489] Re: [mg94411] Re: [mg94379] Manipulate question
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Sun, 14 Dec 2008 07:41:46 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <22774205.1228985653358.JavaMail.root@m02> <200812121155.GAA27958@smc.vnet.net>
- Reply-to: murray at math.umass.edu
I just found a peculiar behavior with such a panel: In the "Factor 1"
field I type: 5. Next, I press Tab, expecting to move to the next input
field; instead, the label "Factor 2" is highlighted! I Tab again so as
to put the cursor into the second input field; as soon as I type into
that field, the white field background (and border around the field)
disappear, leaving my entry on the same shaded background as the panel.
finally, I click the Calculate button; I get result 5 Null.
David Park wrote:
> Throw Manipulate in the ashcan and try something like this:
>
> Module[
> {fac1 = "", fac2 = "", product = ""},
> Panel[
> Column[
> {Row[{"Factor 1: ", InputField[Dynamic[fac1], String]}],
> Row[{"Factor 2: ", InputField[Dynamic[fac2], String]}],
> Dynamic@Row[{"Product: ", product}],
> Row[
> {Button["Clear", fac1 = ""; fac2 = ""; product = ""],
> Button["Calculate",
> product = ToExpression[fac1] ToExpression[ fac2]]}]
> }](* Main Column *),
> Style["Enter and Calculate Form"]
> ](* Panel *)
> ]
>
>
> David Park
> djmpark at comcast.net
> http://home.comcast.net/~djmpark/
>
>
> From: Coleman, Mark [mailto:Mark.Coleman at LibertyMutual.com]
>
>
> Greetings
>
> I'm working on a Manipulate-based interface that takes user input from
> several drop down menus (in my application there are 9 of them) and then
> runs a set of calculations based upon the user's choices. By default
> Manipulate will run the calculation every time the user changes any of
> the drop down menus. Ideally I'd like to have the interface not do any
> computation until the user makes all of their selections and then
> explicitly initiates the calculation (ideally using something like a
> 'Calculate' button). Does anyone have an example of how this might work?
>
> Thanks,
>
> Mark
>
>
>
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
- References:
- Re: Manipulate question
- From: "David Park" <djmpark@comcast.net>
- Re: Manipulate question