Hide Slider Tick Marks

There might be times you want to hide the tick marks of a slider (you think it looks better, you don’t feel like dealing with tick-mark math, etc.). I didn’t think it was possible, but I just now accidentally discovered that setting the slider’s Height property seems to turn off the tick marks.

If it’s a bug, maybe let’s not fix it (unless we add a .HideTickMarks property). :slight_smile:

Here’s an example script to demonstrate. You can uncomment out the background color lines to see how the slider is positioned slighly differently within its panel depending on whether or not the Height is set.

slider_tick_mark_example.py (1.2 KB)

Hi @webdunce, another way to hide tickmarks (in light and dark modes) using reflection:

tp = slider1.ControlObject.TickPlacement.GetType()
slider1.ControlObject.TickPlacement = System.Enum.Parse(tp, "None")

You can control positioning as well, valid values used for the TickPlacement Enum are:

None, TopLeft, BottomRight, Both

_

c.

1 Like