vertical slider

  • 6 Replies
  • 586 Views
vertical slider
« on: 30 December 2017, 04:09:33 »
First of all thank you for this library, It's awesome! I'm new to programming and I've been learning this library and the results are very good. There have been some great moments like using the unbound system and when I succeeded converting the 0.6 scrollable panel example to a 0.7 version and all this inside a class 8) lol.

Now I need to make vertical sliders. I tried slider->setVerticalScroll(true); but I guess it's no longer the way to do it? it must be with the renderer? If you could you show me a quick example of how to do it in 0.7 that would be great.


*

texus

  • *****
  • 1475
    • View Profile
    • Texus's Blog
Re: vertical slider
« Reply #1 on: 30 December 2017, 09:41:24 »
I removed the setVerticalScroll function because it will now be automatically determined based on the size of the slider. So you just have to call setSize with a larger height than width and the slider will become a vertical one.

Re: vertical slider
« Reply #2 on: 30 December 2017, 16:34:49 »
Thank you !

Re: vertical slider
« Reply #3 on: 08 September 2019, 10:39:56 »
I think it would be good to mention about how making slider vertical in documentation because it's not very obvious. 
I actually already wanted to create a new topic but decided use search first ;-)

*

texus

  • *****
  • 1475
    • View Profile
    • Texus's Blog
Re: vertical slider
« Reply #4 on: 08 September 2019, 11:29:39 »
I'm not sure where to best document it.
Maybe we just need to add setVerticalScroll back, but still keeping the automatic detection based on size. So all existing code would still work, but you would also be able to call setVerticalScroll which would swap width and height values if they don't correspond to the requested direction. That way it might be more intuitive to use.

Re: vertical slider
« Reply #5 on: 08 September 2019, 12:56:42 »
I'm not sure where to best document it.
I guess, or into detailed description or as comment to setSize usage example.

Maybe we just need to add setVerticalScroll back, but still keeping the automatic detection based on size. So all existing code would still work, but you would also be able to call setVerticalScroll which would swap width and height values if they don't correspond to the requested direction. That way it might be more intuitive to use.
Yes, it would be great.

*

texus

  • *****
  • 1475
    • View Profile
    • Texus's Blog
Re: vertical slider
« Reply #6 on: 09 September 2019, 19:05:34 »
setVerticalScroll has been added again to Slider, Scrollbar and SpinButton