Home » Developing U++ » UppHub » Improved SliderCtrl?
Improved SliderCtrl? [message #23391] |
Fri, 16 October 2009 04:10  |
avpavp
Messages: 19 Registered: September 2009
|
Promising Member |
|
|
Update: fixed a bug with the paging.
When I made a vertical sliderctrl, i was frustrated to see the min value had to be at the top. This seems counter intuitive. I saw some other posts on the forums regarding this. If you switch the values (hand in the min for max and max for min) the ctrl doesn't work. I've modified the SliderCtrl to allow min value to be greater than max value. This consequently allows you to create a vertical ctrl with (eg. min 100, max -100) and have a ctrl that behaves as you would expect (-100 at the bottom, 100 at the top). This also works for horizontal, so you can have 100 at the left and -100 at the right.
These changes actually simplified the sliderctrl code a little.
I've included a sample app, as well as the modified sliderctrl.cpp/h.
I hope someone may find this useful, and maybe it can be added to the core if appropriate.
[Updated on: Thu, 22 October 2009 06:48] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Wed Apr 30 19:06:00 CEST 2025
Total time taken to generate the page: 0.00379 seconds
|