Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8119191

ScrollBar: There is movement of content that fit in scrollpane.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.0.2
    • fx2.0
    • javafx
    • java6
      fx b42
      windows 7

      To reproduce run following code and scroll mouse wheel on vertical scrollbar



      import javafx.application.Application;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.ScrollPane;

      import javafx.scene.layout.HBox;
      import javafx.scene.layout.VBox;
      import javafx.scene.shape.Rectangle;
      import javafx.stage.Stage;

      public class ScrollPaneSampleRectangle extends Application {

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

         private Parent getContent() {
              VBox box = new VBox();
              ScrollPane pane = new ScrollPane();
              HBox hbox = new HBox(20);
              hbox.getChildren().add(new Rectangle(10,10));
              pane.setContent(hbox);
              pane.setStyle("-fx-vbar-policy: always;");
              pane.setFocusTraversable(false);
              pane.setMaxSize(100, 100);
              box.getChildren().add(pane);


              return box;
          }

          public void start(Stage stage) {
              stage.setX(100);
              stage.setY(100);
              stage.setWidth(300);
              stage.setHeight(300);
              Scene scene = new Scene(getContent());
              stage.setScene(scene);
              stage.show();
          }
      }

            miflemi Mick Fleming
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: