Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: How to use InputField inside Manipulate?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80806] Re: How to use InputField inside Manipulate?
  • From: "Nasser Abbasi" <nma at 12000.org>
  • Date: Sun, 2 Sep 2007 02:56:31 -0400 (EDT)

"Nasser Abbasi" <nma at 12000.org> wrote in message news:...
> Any simple example of how to use InputField inside Manipulate?
>

I figured it at last! I needed to use ControlType->InputField

These are 2 simple examples of how to use InputField inside Manipulate.  I 
am not sure yet which is 'better', i.e. if I needed to use Intepretation to 
make sure the expression is not somehow gets evaluated, or may use use 
HoldForm on it, may be HoldForm is the safest way. I'll play more with it. 
But here is the basic idea:

example 1
-----------
process[eq_] := Text[eq]
Manipulate[process[name], {name, 3*x^2, ControlType -> InputField[]}]


or user Interpretation:
example 2
-----------

process[eq_] := Text[eq]
Manipulate[process[name], {name, Interpretation[3*x^2, 3*x^2],
   ControlType -> InputField[]}]

or use HoldForm:
example 3
------------
process[eq_] := Text[eq]
Manipulate[process[name], {name, HoldForm[3*x^2],
   ControlType -> InputField[]}]

Nasser



  • Prev by Date: Re: plotting equations with units
  • Next by Date: How to use InputField inside Manipulate?
  • Previous by thread: Re: plotting equations with units
  • Next by thread: How to use InputField inside Manipulate?