CSlider that works backwards
-
Normally a CSliderCtrl has its low values at the left/top end and its high values at the right/bottom end. I need a CSliderCtrl that has its low values at the right/bottom end and its high values at the left/top end. I've tried doing MyCSliderCtrl.SetRange(100,0) instead of MyCSliderCtrl.SetRange(0,100) but the thumb gets stuck at the left/top end. Surely there must be an easy way of getting CSliderCtrl to do this, but I can't work out what it is. Does anyone know? --- Thanks, Chris
-
Normally a CSliderCtrl has its low values at the left/top end and its high values at the right/bottom end. I need a CSliderCtrl that has its low values at the right/bottom end and its high values at the left/top end. I've tried doing MyCSliderCtrl.SetRange(100,0) instead of MyCSliderCtrl.SetRange(0,100) but the thumb gets stuck at the left/top end. Surely there must be an easy way of getting CSliderCtrl to do this, but I can't work out what it is. Does anyone know? --- Thanks, Chris
Can't you just set the range to be 0 -> 100, and do 100 - (slider value) to get the "reverse" value?
-
Normally a CSliderCtrl has its low values at the left/top end and its high values at the right/bottom end. I need a CSliderCtrl that has its low values at the right/bottom end and its high values at the left/top end. I've tried doing MyCSliderCtrl.SetRange(100,0) instead of MyCSliderCtrl.SetRange(0,100) but the thumb gets stuck at the left/top end. Surely there must be an easy way of getting CSliderCtrl to do this, but I can't work out what it is. Does anyone know? --- Thanks, Chris
That's probably impossible because of the internal implementation of the control. BUT! All you have to do is set the range the normal way, SetRange( 0, 100 ), and then say:
RealValue = 100 - MyCSliderCtrl.GetValue();