如何强制文本区域调整fxml的大小

How to force text area to resize fxml

我目前正在开发一个小型应用程序。我目前正在研究图形用户界面,我已经安排好了一切。目前看起来像这样:

我想让文本区域填充下面的灰色区域。需要明确的是,我 希望它像这里所有其他问题一样随内容调整大小,只是为了填充灰色区域。我无法设置静态大小,因为 gui 的大小是根据用户的显示而定的。我只想要文本区域覆盖其下方的灰色框。

这是 FXML:

    <?xml version="1.0" encoding="UTF-8"?>

    <?import java.lang.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>

    <BorderPane xmlns="http://javafx.com/javafx/8"     xmlns:fx="http://javafx.com/fxml/1" fx:controller="code.matthew.todo.ControllerMain">
   <left>
      <ListView fx:id="todoList" prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
   </left>
   <center>
      <VBox prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
         <children>
               <Label fx:id="todoName" text="Name:" />
               <Label fx:id="todoDueBy" text="Due by:" />
               <TextArea fx:id="todoInfo" prefHeight="206.0" prefWidth="100.0" wrapText="true" />
         </children>
      </VBox>
   </center>
   <top>
      <MenuBar BorderPane.alignment="CENTER">
        <menus>
          <Menu mnemonicParsing="false" text="File">
            <items>
              <MenuItem fx:id="newTodo" mnemonicParsing="false" onAction="#newTODO" text="New" />
                  <MenuItem fx:id="deleteTodo" mnemonicParsing="false" text="Delete" />
                  <MenuItem fx:id="closeApp" mnemonicParsing="false" text="Close" />
            </items>
          </Menu>
          <Menu mnemonicParsing="false" text="Help">
            <items>
                  <MenuItem mnemonicParsing="false" text="Help" />
                  <MenuItem mnemonicParsing="false" text="Settings" />
              <MenuItem fx:id="menuAbout" mnemonicParsing="false" onAction="#openAbout" text="About" />
            </items>
          </Menu>
        </menus>
      </MenuBar>
   </top>
</BorderPane>

谢谢!

TextAreaVBox.vgrow 属性 设置为 ALWAYS:

<TextArea fx:id="todoInfo" prefHeight="206.0" prefWidth="100.0" wrapText="true" VBox.vgrow="ALWAYS" />