# How change style of InputField in a Manipulate?

Is it possible to specify a style, e.g., font size, for InputField type controls inside a Manipulate and if so, how?

For example, in the following the BaseStyle option to Manipulate changes the output font size but not the font size of the input fields:

Manipulate[
y[t] /. First@
DSolve[{a y''[t] + b y'[t] + c y[t] == r, y[t0] == ic, y'[t0] == icp}, y[t], t],
{{a, 1}, "a"}, {{b, 1}, "b"}, {{c, 1}, "c"}, {{r, 0}, "r(t)"},
{{t0, 0}, "t0"}, {{ic, 0}, "y[t0]"}, {{icp, 0}, "y'[t0]"},
ControlType -> InputField, BaseStyle -> 16]


I tried the "obvious" way of using, e.g., Style[a] instead of a in the control-variable specification, but that's erroneous.

You have a few syntax errors. Here you have them corrected and an example on how to change each component styling:

Manipulate[
y[t] /. First@ DSolve[{a y''[t] + b y'[t] + c y[t] == r, y[t0] == ic, y'[t0] == icp}, y[t], t],
{{a, 1, "a"}},
{{b, 1, "b"}},
{{c, 1, "c"}},
{{r, 0, "r(t)"}},
{{t0, 0, "t0"}},
{{ic, 0, "y[t0]"}},
{{icp, 0, Style["y'[t0]", {16, Red}]}, BaseStyle -> 30},
ControlType -> InputField, BaseStyle -> {16, Bold}]


• Actually, and not considering how to change the style of the input fields, I don't think I had any syntax errors except in so far as the field labels are concerned; for that your revised syntax is correct. – murray Feb 27 '15 at 4:47
• Works nicely: thanks! (For the record, this was the first answer posted, but it was withdrawn temporarily before I got a chance to accept it and thank its author, @belisarius.) – murray Feb 27 '15 at 20:11

put it as a specification of the controller

Manipulate[x, {{x, 0}, 0, 100, BaseStyle -> FontSize -> 25}, ControlType -> InputField]


### Quick notes

• Nonuniform styles handling is really annoying, one have to always remember what can be inherited and what not or put explicit directives everywhere.

• Here it is also strange because BaseStyle applies to body of a Manipulate and labels, not to controller even though that Style[InputField[], 25] can inherit FontSize.
• thanks, that works perfectly. Since the only style parameter I need to change is the font size, the target of BaseStyle can be simplified a bit: Manipulate[a, {{a, 1, Style["a", 16]}, BaseStyle -> 16}, ControlType -> InputField] – murray Feb 27 '15 at 18:31