5
$\begingroup$

I try to use HorizontalGauge in Manipulate as follows:

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

but it didn't work. 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$

1 Answer 1

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.

$\endgroup$
1
  • $\begingroup$ Okay, thank you. $\endgroup$
    – DORA
    Sep 10, 2020 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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