5
$\begingroup$

I try to use horizontalgauge in Manipulate as following:

    Manipulate[
 Graphics[Disk[]],
 HorizontalGauge[Dynamic[x], {0, 100}]
 ]

but it didn't work, but if I wrap the gauge with Row[] then it works, can anyone explain why it works like this?

    Manipulate[
 Graphics[Disk[]],
 Row@{HorizontalGauge[Dynamic[x], {0, 100}]}
 ]
$\endgroup$
5
$\begingroup$

In Manipulate >> Details and Options allowed forms of the second argument are listed:

enter image description here

So HorizontalGauge[Dynamic[x], {0,10}] (or, for that matter, Slider[Dynamic[x], {0, 10}] or Checkbox[Dynamic[z]] or InputField[Dynamic[w]] etc.) is not allowed in the second (or later) argument.

The highlighted row of the list is elaborated on as

enter image description here

So using Row @ {HorizontalGauge[...], Style @ HorizontalGauge[...], Text @ HorizontalGauge[...] etc. do work.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Okay, thank you. $\endgroup$ – DORA Sep 10 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.