This content has been marked as final. Show 3 replies
Not that I know of. Searching for "prefWidth" in the CSS documentation yields no results. JavaFX layout is typically not managed by CSS, but by FXML and/or Java. You can set the prefHeight and prefWidth as attributes in the FXML file:
or in Java:
<ListView fx:id="..." prefWidth="130" prefHeight="100" ... />
ListView<String> listView = new ListView<String>(); listView.setPrefWidth(130); listView.setPrefHeight(100);
In JavaFX 8, you can specify min/max/pref width and height for Region.1 person found this helpful
David: very cool. I hadn't seen that addition.