开发者

Flex VSlider Reverse direction

开发者 https://www.devze.com 2022-12-26 13:26 出处:网络
Out of the box, a VSlider puts the minumum value on the bottom of the VSlider and the maximum value on the top of the VSlider. That makes sense....most of the time.

Out of the box, a VSlider puts the minumum value on the bottom of the VSlider and the maximum value on the top of the VSlider. That makes sense....most of the time.

开发者_运维问答I'd like to reverse these....maximum value on the bottom, minimum value on the top...

And I'd like to avoid the headache associated with mySlider.rotation = 180

Man, you think there'd be a property for this...

Thanks.


You can extend the VSlider and add a method that reports the reverse of the slider value.

public function getReverseSliderValue() : Number {
  return Math.abs(this.value - this.maximum) + this.minimum;
  //Adding minimum is necessary when minimum != 0
}
0

精彩评论

暂无评论...
验证码 换一张
取 消