Tag Info

New answers tagged

2

The usual way to do this is to work with lists or arrays rather than try and create symbols. Here is a list version. chg = ConstantArray[Null, 5]; pos = ConstantArray[Null, 5]; Grid[{ Join[{"Chg"}, Table[With[{i = i}, InputField[Dynamic[chg[[i]]], FieldSize -> 4]], {i, Length[chg]}]], Join[{"Pos"}, Table[With[{i = i}, ...


2

This mess will get you something close to what you'd like, I'll explain the details below: symbols = {"a1", "a2", "a3"}; Grid[Prepend[Transpose@ Prepend[Map[{InputField[ToExpression["Dynamic[" <> # <> "$Chg]"],String,FieldSize->{4,1}], InputField[ToExpression["Dynamic[" <> # <> "$Pos]"], String,FieldSize -> {4, 1}]} ...


3

Here are two ways. One of them may be what the OP alluded to in a comment; in any case, I'll give a complete solution below. First, using If inside one InputField: The trick here is to use the second argument of Dynamic. DynamicModule[{a = 1, b = 20, fuc = "1"}, Deploy[Style[ Panel[Grid[ Transpose[{{"Input Format", "Value"}, ...


5

Update. Thanks to Eldo, Dynamic is needed outside the InputField. DynamicModule[{a = 1, b = 20, fuc = "1"}, Deploy[Style[Panel[Grid[Transpose[ { {"Input Format", "Value"}, {PopupMenu[Dynamic[fuc], {"1", "2"}], Dynamic@InputField[ If[fuc == "1", a, b], Number, Enabled -> Dynamic[fuc == "1"] ...



Top 50 recent answers are included