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

[RangeSlider][mouse moving] setOrientation VERTICAL

Original report by Bourasseau David (Bitbucket: dbourasseau, GitHub: dbourasseau).

Hello, I come to report a bug when doing a "vSlider.setOrientation (Orientation.VERTICAL)." Function move the Range Slider does not function right


#!java
package application;

import org.controlsfx.control.RangeSlider;
import javafx.application.Application;
import javafx.geometry.Orientation; 
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.HBox;

public class Main extends Application {

    public void start(Stage primaryStage) {
        try {
            HBox HBox = new HBox(10);

            final RangeSlider vSlider = new RangeSlider(0, 200, 30, 150);
            vSlider.setOrientation(Orientation.VERTICAL);
            vSlider.setShowTickMarks(true);
            vSlider.setShowTickLabels(true);
            vSlider.setBlockIncrement(10);
            HBox.getChildren().add(vSlider);
            Scene scene = new Scene(HBox);

            primaryStage.setScene(scene);
            primaryStage.show();
        } catch(Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        launch(args);
    }
}

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

  • 写回答

5条回答 默认 最新

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

    Original comment by Jonathan Giles (Bitbucket: JonathanGiles, GitHub: JonathanGiles).

    Resolving #282 . Vertical mode was not taken into account in RangeSliderBehavior resulting in an incorrect move of the slider when dragging it.

    评论

报告相同问题?