weixin_39918128 2020-11-20 13:09
浏览 0

RangeSlider snapToTicks does not work when the entire range is modified

Original report by Felix (Bitbucket: quantumbyte, GitHub: quantumbyte).

Hi,

this is the Code I used:


#!java

    private RangeSlider createRangeSlider(int min, int max, int lower, int higher)
    {
        RangeSlider slider = new RangeSlider(min, max, lower, higher);
        slider.setShowTickMarks(true);
        slider.setShowTickLabels(true);
        slider.setMajorTickUnit(5);
        slider.setMinorTickCount(5);  //Use 1 here to make the error more obvious
        slider.setSnapToTicks(true);
        return slider;
    }

I wanted the Thumbs to snap to the ticks, however this does not work if I drag the whole range-area. This is really annoying, because I want to allow int-values only.

该提问来源于开源项目:controlsfx/controlsfx

  • 写回答

9条回答 默认 最新

  • weixin_39918128 2020-11-20 13:09
    关注

    Original comment by Samir Hadzic (Bitbucket: shadzic, GitHub: shadzic).

    Well I don't think we're pushing any changes to 8.0-final branch. We're working on new version of Java and we're not back porting bug resolution on earlier version.

    So the solution you have is to either upgrade your java version to the latest version, or modify your own version of ControlsFX..

    评论

报告相同问题?