Layout FXML FlowPane扩展到父级大小
我有一个具有以下结构的应用程序:Layout FXML FlowPane扩展到父级大小,layout,javafx-8,fxml,Layout,Javafx 8,Fxml,我有一个具有以下结构的应用程序: <GridPane> <columnConstraints> <ColumnConstraints fillWidth="true" hgrow="ALWAYS" /> </columnConstraints> <rowConstraints> <RowConstraints fillHeight="true" vgrow="
<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
的父容器的大小。根据用户选择动态添加节点。到目前为止,我观察到的是流窗格没有填充。发生了什么:流窗格没有填充网格窗格,或者网格窗格没有填充其父窗格(不管是什么)?您在网格窗格中似乎只有一个子节点:您不能删除网格窗格并直接将流窗格放在网格窗格的父节点中吗?实际上,我在GridPane
左列有另一个ListView
。为了简单起见,省略了它。工作流程是:当用户单击列表视图
上的某个项目时,应用程序将在右侧列的流程窗格
上加载图像。