FXML FlowPane扩展到父级大小

时间:2017-05-09 03:11:59

标签: layout javafx-8 fxml

我有一个具有以下结构的应用程序:

<GridPane>
    <columnConstraints>        
        <ColumnConstraints fillWidth="true" hgrow="ALWAYS" />
    </columnConstraints>
    <rowConstraints>
        <RowConstraints fillHeight="true" vgrow="ALWAYS" />
    </rowConstraints>
    <children>
        <FlowPane fx:id="flwPictures" GridPane.columnIndex="0" GridPane.rowIndex="0" 
                GridPane.fillHeight="true" GridPane.fillWidth="true" 
                GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS" >
            <padding>
                <Insets top="2.0" bottom="2.0" left="2.0" right="2.0" />
            </padding>
            <children>              
            </children>
        </FlowPane>
    </children>
</GridPane>

我需要FlowPane来填充GridPane的父容器的大小。根据用户选择动态添加节点。到目前为止,我观察到流窗格没有填充。

0 个答案:

没有答案