Set multiple styleClass values


Question

How does one set two classes on a node in a JavaFX FXML file?

<VBox styleClass="notice high">

This adds one value "notice high" instead of two values "notice" and "high". How can I add two values?

1
13
8/29/2014 3:07:53 AM

Accepted Answer

"Primitive type" lists can be seperated by ',' inside an attribute

<VBox xmlns:fx="http://javafx.com/fxml/1" styleClass="a, b">
23
8/29/2014 8:21:50 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon