Hbox не помещается в ряд в сетке - PullRequest
0 голосов
/ 24 марта 2019

Hbox (имя: row0Hbox) не помещается в 0 строку в Gridpane. Я не могу изменить его высоту. Я использую SceneBuilder.

Я попытался изменить проценты строки 0 и 1, а затем повторить попытку, но ничего не помогло. Hbox не отвечает на любые изменения размера. Это мой первый пользовательский интерфейс в javafx, поэтому я понятия не имею, что может быть не так. Спасибо за помощь.

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

<?import javafx.scene.effect.*?>
<?import javafx.scene.text.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.web.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>

<GridPane gridLinesVisible="false" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1049.0" prefWidth="2048.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="zad1.Controller">
   <columnConstraints>
      <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
      <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
      <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="33.0" prefWidth="100.0" />
   </columnConstraints>
   <rowConstraints>
      <RowConstraints maxHeight="310.7" minHeight="10.0" percentHeight="22.0" prefHeight="241.7" vgrow="SOMETIMES" />
      <RowConstraints maxHeight="807.3" minHeight="10.0" percentHeight="78.0" prefHeight="807.3" vgrow="SOMETIMES" />
   </rowConstraints>
   <children>
      <WebView fx:id="webView" prefHeight="200.0" prefWidth="200.0" GridPane.columnSpan="3" GridPane.rowIndex="1" />
      <HBox id="row0Hbox" prefHeight="263.0" prefWidth="2041.0" style="-fx-background-color: #D0D3D4;" GridPane.columnSpan="3" GridPane.hgrow="SOMETIMES">
         <padding>
            <Insets left="10.0" />
         </padding>
         <GridPane.margin>
            <Insets />
         </GridPane.margin>
         <children>
            <VBox prefHeight="315.0" prefWidth="710.0">
               <children>
                  <Label fx:id="weatherLabel" prefHeight="305.0" prefWidth="700.0" textAlignment="JUSTIFY">
                     <font>
                        <Font name="Arial" size="16.0" />
                     </font></Label>
               </children></VBox>
            <VBox prefHeight="315.0" prefWidth="743.0">
               <children>
                  <Label fx:id="currencyLabelInfo" prefHeight="305.0" prefWidth="700.0" textAlignment="JUSTIFY">
                     <font>
                        <Font name="Arial" size="16.0" />
                     </font></Label>
               </children></VBox>
            <HBox prefHeight="315.0" prefWidth="722.0">
               <children>
                  <VBox alignment="TOP_RIGHT" prefHeight="200.0" prefWidth="361.0" spacing="35.0">
                     <children>
                        <Label fx:id="countryLabel" text="Pass Country:">
                           <VBox.margin>
                              <Insets top="55.0" />
                           </VBox.margin>
                        </Label>
                        <Label fx:id="cityLabel" text="Pass City:" />
                        <Label fx:id="currencyLabel" text="Pass Currency:" />
                     </children>
                  </VBox>
                  <VBox fillWidth="false" prefHeight="257.0" prefWidth="322.0" spacing="25.0">
                     <children>
                        <TextField fx:id="countryTextField">
                           <VBox.margin>
                              <Insets top="50.0" />
                           </VBox.margin>
                        </TextField>
                        <TextField fx:id="cityTextField" />
                        <TextField fx:id="currencyTexField" />
                        <Button fx:id="searchButton" mnemonicParsing="false" onMouseClicked="#searchButtonMouseClicked" text="Search">
                           <VBox.margin>
                              <Insets bottom="50.0" left="60.0" />
                           </VBox.margin>
                           <padding>
                              <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
                           </padding>
                        </Button>
                     </children>
                  </VBox>
               </children>
            </HBox>
         </children>
      </HBox>
   </children>
</GridPane>
...