Trying to display the value of wl3 in the top right box
I would not use Manipulate inside Manipulate. You can do all this with one manipulate.
The idea is to use None
for Manipulate, and then use Grid
to layout both the control variables and also the output which normally goes where None
now sits. But to do this, you need to use Dynamic
for the output part.
wl3[wl1_, wl2_] := wl1 + wl2;
Manipulate[
None,
Grid[{
(*first two grids are control variables *)
{Grid[{{"Wavelength1",
Manipulator[Dynamic[wl1, {wl1 = #} &], {0, 1, .1},
ImageSize -> Tiny]}, {Dynamic[wl1]}}, Frame -> True],
Grid[{{"Wavelength2",
Manipulator[Dynamic[wl2, {wl2 = #} &], {0, 1, .1},
ImageSize -> Tiny]}, {Dynamic[wl2]}}, Frame -> True],
(*this is the output, must be dynamic *)
Grid[{{"wl1+wl2"},
{Dynamic@Row[{ wl1,"+",wl2," = ",wl3[wl1,wl2]}]}},Frame->True]
}}, Spacings -> {1, 1}, Background -> White
],
Alignment -> Center, ImageMargins -> 0, FrameMargins -> 1,
ContentSize -> {0}, SynchronousInitialization -> True,
ContinuousAction -> True, Alignment -> Center, Paneled -> True,
Frame -> False
]