Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Improved SliderCtrl?
Improved SliderCtrl? [message #23391] Fri, 16 October 2009 04:10 Go to next message
avpavp is currently offline  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

Re: Improved SliderCtrl? [message #23518 is a reply to message #23391] Mon, 26 October 2009 09:53 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks, this is useful. Merged into CtrlLib.

Welcome to contributors list Smile

Mirek
Previous Topic: New packages announcement
Next Topic: Console Directory Compare
Goto Forum:
  


Current Time: Sat Apr 20 12:03:09 CEST 2024

Total time taken to generate the page: 0.05028 seconds