hide Slider and position Grabber

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pferft

Hi everyone,

is there any way to hide that horizontal line of an HSlider (but keep the Grabber visible)?

And it appears that the Grabber is always in position 0 on starting up the program. Is it possible to position the Grabber through code according to a given value?
For example, on Startup the DataManager loads the value 7.39; how could the Grabber be put in the correct place on the Slider?

:bust_in_silhouette: Reply From: jgodfrey

You can set the position of the grabber by setting the value property of the control, which should fall somewhere between min_vaue and max_value.

For example, if min_value = 0 and max_value = 100, setting value = 50 will place the grabber at position of 50%…

Regarding hiding the drag area, I’m not aware of a simple property that will do that, though I assume you could accomplish it via the underlying theme. That said, I haven’t tried.

I dealt with all kinds of tweaked numbers and variables but never actually put a straight “value” into the script - works perfectly, thank you.

And yes, NewStyleBoxEmpty in Theme hides the drag area, so thanks for that hint as well : )

pferft | 2023-03-03 17:00