Slider thumb position

  • 3 Replies
  • 85 Views
Slider thumb position
« on: 27 April 2020, 17:49:23 »
Hi, is there possible to change "zero" position of slider's thumb? I want to align thumb and track to the left.

Re: Slider thumb position
« Reply #1 on: 27 April 2020, 17:56:51 »
Can you provide more info about use case or maybe code  with demonstration example ? It's not very clear what exactly do you want.

As an option you can set some initial value and forbid change value less than this value in handling "valueChanged" signal.

*

texus

  • *****
  • 1544
    • View Profile
    • Texus's Blog
Re: Slider thumb position
« Reply #2 on: 27 April 2020, 18:20:14 »
The center of the thumb is currently always placed at the leftmost position of the track. I don't think there currently is a good way to work around this.
I'll consider adding an option to the renderer to choose the behavior so that you could make it so that the entire thumb always remains on top of the track.

*

texus

  • *****
  • 1544
    • View Profile
    • Texus's Blog
Re: Slider thumb position
« Reply #3 on: 30 April 2020, 19:25:49 »
@Tojmak I've added a ThumbWithinTrack option to the renderer in TGUI 0.9-dev. Setting it to true will make the side of the thumb align with the side of the track when the thumb has minimum or maximum value.