New answers tagged

2

This too does the same thing: Button[#, f[#]] & /@ Range@2 Also an ugly but stupid way: Table["Button[" <> ToString@i <> ",f[" <> ToString@i <> "]]", {i, 2}] // ToExpression One can write it down without thinking.


4

You can use With Table[With[{i = i}, Button[i, f[i]]], {i, 1, 2}]


4

You can specify exactly what you want using controls. Have a look at the Introduction to Control Objects tutorial. Manipulate[x, Row[{ Slider[Dynamic@x, {-100, 100, 0.001}], Button["\[LessLess]", x = Max[x - 0.01, -100]], Button["<", x = Max[x - 0.001, -100]], Button[">", x = Min[x + 0.001, 100]], Button["\[GreaterGreater]", x = Min[x ...


3

Code: Manipulate[ x, {{x, 0, "X:"}, -100, 100, 0.001} ] Output: Reference: Manipulate Tutorial: Introduction to Manipulate



Top 50 recent answers are included