500*_*500 5 controls wolfram-mathematica
我想将Pink&Green CheckBox控件显示在一行上.尽管对ControlPlacement帮助进行了广泛的了解,但我无法对其进行调整以使其正常工作.
Manipulate[
Graphics[{If[thePink, {Pink, Disk[{5, 5}, r]}],
If[theGreen, {Green, Disk[{4, 2}, r]}]},
PlotRange -> {{0, 20}, {0, 10}}], {{r, 1,
Style["Radius", Black, Bold, 12]}, 1, 5, 1, ControlType -> Setter,
ControlPlacement -> Top}, {{thePink, True,
Style["Pink", Black, Bold, 12]}, {True, False}}, {{theGreen, False,
Style["Green", Black, Bold, 12]}, {True, False}}]
Run Code Online (Sandbox Code Playgroud)

使用Row[ ]和Control[ ]:
Manipulate[Graphics[{If[thePink, {Pink, Disk[{5, 5}, r]}],
If[theGreen, {Green, Disk[{4, 2}, r]}]}, PlotRange -> {{0, 20}, {0, 10}}],
{{r, 1, Style["Radius", Black, Bold, 12]}, 1, 5, 1, ControlType -> Setter,
ControlPlacement -> Top},
Row[
{Control@{{thePink, True, Style["Pink", Black, Bold, 12]}, {True, False}},
Spacer[20],
Control@{{theGreen, False, Style["Green", Black, Bold, 12]}, {True,False}}}]]
Run Code Online (Sandbox Code Playgroud)
