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

[TreeView] Right click on the scroll bar scrolls the content.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • 8
    • 8
    • javafx
    • jdk 1.8.0 - b62

    Description

      To reproduce the bug right click the scroll bar. You'll see that content is scrolled.


      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.TreeItem;
      import javafx.scene.control.TreeView;
      import javafx.scene.layout.HBox;
      import javafx.stage.Stage;

      public class BugTreeViewRightCilck extends Application {

          TreeView testedControl;

          @Override
          public void start(Stage stage) {

              testedControl = new TreeView();
              testedControl.setMaxHeight(150d);
              testedControl.setPrefHeight(150d);
              
              TreeItem rootItem = new TreeItem("Root");
              rootItem.setExpanded(true);
              testedControl.setRoot(rootItem);
              
              for (int i = 0; i < 10; i++) {
                  TreeItem item = new TreeItem("item - " + i);
                  item.setExpanded(true);
                  rootItem.getChildren().add(item);
                  
                  for (int j = 0; j < 10; j++) {
                      item.getChildren().add(new TreeItem("item - " + i + " - " + j));
                  }
              }
              
              HBox root = new HBox(20d);
              root.getChildren().add(testedControl);

              Scene scene = new Scene(root, 300, 250);

              stage.setScene(scene);
              stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
              stage.show();
          }

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

      }

      Attachments

        Issue Links

          Activity

            People

              miflemi Mick Fleming
              dzinkevi Dmitry Zinkevich (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: