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

[ListView] selection using shift+pageUp/down is broken.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8u40
    • fx2.1
    • javafx
    • 2.1.0b18

      Run attached code:

      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.ListView;
      import javafx.scene.control.SelectionMode;
      import javafx.stage.Stage;

      public class Main extends Application {

          @Override
          public void start(Stage stage) {
              ListView LV = new ListView();
              LV.setPrefHeight(100);
              LV.setPrefWidth(50);
              LV.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
              
              for (int i = 0; i < 20; i++) {
                  LV.getItems().add(i, i);
              }
              
              Group root = new Group();
              
              root.getChildren().addAll(LV);
              stage.setScene(new Scene(root, 300, 300));
              stage.show();
          }
          
          public static void main(String[] args) {
              launch(Main.class, args);
          }
      }

      1) Select the first item
      2) press shift+pageDown 2 times.
      3) preff shift+pageUp 1 time.
      See, selection is the first item only, but I expect 4-5 items to be selected.

            jgiles Jonathan Giles
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: