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