Implementing a range slider
Posted: Mon Aug 15, 2022 7:43 am
Hello! I'm trying to figure out the best way to create a control for setting a range. In practice, that just means setting two values (min & max) with one control, and making sure the max value is always equal to or larger than the min. A vertical slider with two handles would be perfect, with both handles moving if you grab the space between the handles, or if you move one of them and "hit" the other one.
I already created a custom range slider using images & mouse notifications, and it works pretty much perfectly, but the downside is that since it's not a standard VM control, I can't do perform assigns or MIDI learn etc. I also tried putting two standard sliders on top of each other, but the top one always steals the mouse clicks (even if the sliders have no background image), and AFAICS there's no way to get around this. I _could_ put two sliders right next to each other and maybe style the handles so that they look like two halves of a single handle, and that would of course work... but it's not as elegant as having two handles moving along the same Y axis, I think.
Maybe there's a simple solution to this, but I just can't see it... Any ideas? Thanks!
I already created a custom range slider using images & mouse notifications, and it works pretty much perfectly, but the downside is that since it's not a standard VM control, I can't do perform assigns or MIDI learn etc. I also tried putting two standard sliders on top of each other, but the top one always steals the mouse clicks (even if the sliders have no background image), and AFAICS there's no way to get around this. I _could_ put two sliders right next to each other and maybe style the handles so that they look like two halves of a single handle, and that would of course work... but it's not as elegant as having two handles moving along the same Y axis, I think.
Maybe there's a simple solution to this, but I just can't see it... Any ideas? Thanks!