-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8, 9.0.1, 10
-
generic
-
generic
FULL PRODUCT VERSION :
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
Setting a skin and cell size in a stylesheet for the list-cell styleclass leads to a wrong computation of the popuplist of a combobox if you open it for the first time
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* set a skin and cell-size for .list-cell in the css-file
* use a combobox in an appliation that contains e.g 4 items
* run the application and open the popuplist of the combobox
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected result would be that the popuplist shows all 4 entries without a scrollbar
ACTUAL -
The populist shows two and a half entry with a vertical scrollbar
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
css - file:
.list-cell {
-fx-skin: "javafx.scene.control.skin.ListCellSkin";
-fx-cell-size: 40px;
}
-----------------
Testapplication:
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
AnchorPane root = new AnchorPane();
Scene scene = new Scene(root, 400, 400);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
ComboBox<String> combo = new ComboBox();
combo.getItems().addAll("entry 1", "entry 2", "entry 3", "entry 4");
root.getChildren().add(combo);
primaryStage.setScene(scene);
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
Setting a skin and cell size in a stylesheet for the list-cell styleclass leads to a wrong computation of the popuplist of a combobox if you open it for the first time
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* set a skin and cell-size for .list-cell in the css-file
* use a combobox in an appliation that contains e.g 4 items
* run the application and open the popuplist of the combobox
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected result would be that the popuplist shows all 4 entries without a scrollbar
ACTUAL -
The populist shows two and a half entry with a vertical scrollbar
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
css - file:
.list-cell {
-fx-skin: "javafx.scene.control.skin.ListCellSkin";
-fx-cell-size: 40px;
}
-----------------
Testapplication:
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
AnchorPane root = new AnchorPane();
Scene scene = new Scene(root, 400, 400);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
ComboBox<String> combo = new ComboBox();
combo.getItems().addAll("entry 1", "entry 2", "entry 3", "entry 4");
root.getChildren().add(combo);
primaryStage.setScene(scene);
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8188249 ComboBox dropdown listview has inconsistent height, does not fit items
-
- Open
-