# How to make value of HorizontalGauge be continuously updated in Manipulate?

I wrote the following code:

Manipulate[HorizontalGauge[Dynamic[x], {0, range}], {range, 5, 10}]


I want to plot a HorizontalGauge with dynamic range, but the marker of the HorizontalGauge does not respond to dragging, I could only click on the axis to change value of x, how to fix it?

• TrackedSymbols :> {range} will fix the problem with dragging it, but it is unlikely to work for what you want to do. Sep 14 '20 at 8:30
• Thanks, it works if it's wrapped with Manipulate[], but what if there is no Manipulate, just HorizontalGauge[], and "range" is a value varying with another function, i wrote "Dynamic[range]", but it didn't work.
– DORA
Sep 14 '20 at 8:59
• i add a picture to explain what i meant, if i change the value of "range" by the Slider[], the HorizontalGauge dosn't work when i drag it.
– DORA
Sep 14 '20 at 9:08

Dynamic[HorizontalGauge[Dynamic[x], {0, range}], TrackedSymbols :> {range}]