Hi everyone, I'm developing a wave laboratory which will grow a lot in the following weeks. Things are going fine and fast, except by the system of hiding controls. I can make them work fine, but when some disapeaers Null stay in their places. I can make to hide Null by adding an extra line with nothing inside. But this is not a solution because blank lines replaces the Null lines.
It seems to me that the problem comes from the combination of
Dynamic[
If[menu == 1,
Grid[{
with
If[quantOndas == 1,
Invisible,
Identity]@
In the code below the first Grid has a blank line, which acts as a separator. Not a problem.
I would like to make the Null go home and left nothing in its place.
I'll appreciate any help.
Manipulate["Hi",
Grid[{
{Control@{{menu, 1 , "Menu:"}, {1 -> "Menu 1", 2 -> "Menu 2"},
ControlType -> RadioButtonBar}},
{""}
}],
Dynamic[
If[menu == 1,
Grid[{
{Control@{{menuInterf, 1, "Operation mode:"}, {1 -> "Manual",
2 -> "Automatic"}, ControlType -> RadioButtonBar}}
}]
]
],
Dynamic[
If[menu == 1 && menuInterf == 1,
Grid[{
{Control@{{quantWaves, 1, "Number of waves:"}, {1, 2},
ControlType -> RadioButtonBar},
If[quantOndas == 1,
Invisible,
Identity]@
Control@{{showSumWaves, False, "Show sum of waves:"}, {True,
False}, ControlType -> Checkbox}}
}]
]
],
Dynamic[If[menu == 2,
Grid[{
{Control@{{menuOndasEstac, 1,
"Stationary waves:"}, {1 -> "Two nodes",
2 -> "Node and antinode", 3 -> "Two antinodes"},
ControlType -> RadioButtonBar}},
{Control@{{harmDispon, 1, "Harmonics:"}, Dynamic@harmonics,
ControlType -> PopupMenu},
Control@{{mostrOndasOrig, True, "Show original waves:"}, {True,
False}, ControlType -> Checkbox}}
}]
]
]
,
Initialization :> (
menuInterf = 1;
harmonics = Range[10];
)
]