-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
fx2.1
Tried to select my flowpane, result is null. With removing the scrollpane it works as expected.
Quote description of lookup method:
"Finds this Node, or the first sub-node, based on the given CSS selector. If this node is a Parent, then this function will traverse down into the branch until it finds a match. If more than one sub-node matches the specified selector, this function returns the first of them. "
VBox vbox = (VBox )FXMLLoader.load(TestClass.class.getResource(fxml));
vBox.lookup("#elementsPane");
<VBox xmlns:fx="http://javafx.com/fxml">
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
<FlowPane fx:id="elementsPane" VBox.vgrow="ALWAYS" vgap="4" hgap="4" alignment="BASELINE_CENTER">
<styleClass>
<String fx:value="elementsPane" />
</styleClass>
</FlowPane>
</ScrollPane>
</VBox>
Quote description of lookup method:
"Finds this Node, or the first sub-node, based on the given CSS selector. If this node is a Parent, then this function will traverse down into the branch until it finds a match. If more than one sub-node matches the specified selector, this function returns the first of them. "
VBox vbox = (VBox )FXMLLoader.load(TestClass.class.getResource(fxml));
vBox.lookup("#elementsPane");
<VBox xmlns:fx="http://javafx.com/fxml">
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
<FlowPane fx:id="elementsPane" VBox.vgrow="ALWAYS" vgap="4" hgap="4" alignment="BASELINE_CENTER">
<styleClass>
<String fx:value="elementsPane" />
</styleClass>
</FlowPane>
</ScrollPane>
</VBox>