I'm having some difficulty understanding how to get input fields to disable dynamically in response to other parts of a ui. Here is an example:
DynamicModule[
{disable = True, a = "", b = ""}
,
Panel[
Column[
{
Row[{"Field 1: ", InputField[Dynamic[a, TrackedSymbols
:> {a, disable}], String, Enabled -> Dynamic[!disable]]}]
,
Row[
{
"Field 2: "
,
InputField[
Dynamic[
If[disable,
"T"
,
"F"
]
]
,
String
,
Enabled -> Dynamic[!disable]
]
}
]
,
Row[{Checkbox[Dynamic[disable]], " Disable the fields"
}]
}
]
]
]
This doesn't work as expected. The second field correctly becomes enabled in response to the checkbox, the first remains stubbornly disabled. I'd understood that using tracked symbols ought to force updating of the field whenever the value of disable changes.
Dynamic@InputField[Dynamic[a], Boxes, Enabled -> (! disable)]$\endgroup$