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

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<VBox prefHeight="236.0" prefWidth="600.0" spacing="10" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.zhangmeng.online.exam.ui.controller.QuestionEditController">
    <padding>
        <Insets bottom="10" left="10" right="10" top="10" />
    </padding>

    <GridPane hgap="10" vgap="10">
        <columnConstraints>
            <ColumnConstraints minWidth="80" prefWidth="100" />
            <ColumnConstraints hgrow="ALWAYS" />
        </columnConstraints>


        <Label text="问题:" GridPane.columnIndex="0" GridPane.rowIndex="0" />
        <TextField fx:id="questionField" GridPane.columnIndex="1" GridPane.rowIndex="0" />


        <Label text="分值:" GridPane.columnIndex="0" GridPane.rowIndex="1" />
        <TextField fx:id="scoreField" GridPane.columnIndex="1" GridPane.rowIndex="1" />


        <Label text="问题解析:" GridPane.columnIndex="0" GridPane.rowIndex="2" />
        <TextField fx:id="explanationField" GridPane.columnIndex="1" GridPane.rowIndex="2" />


        <Label text="类型:" GridPane.columnIndex="0" GridPane.rowIndex="3" />
        <ComboBox fx:id="typeComboBox" GridPane.columnIndex="1" GridPane.rowIndex="3" />


        <Label text="所属学科:" GridPane.columnIndex="0" GridPane.rowIndex="4" />
        <ComboBox fx:id="subjectComboBox" GridPane.columnIndex="1" GridPane.rowIndex="4" />
      <rowConstraints>
         <RowConstraints />
         <RowConstraints />
         <RowConstraints />
         <RowConstraints />
         <RowConstraints />
      </rowConstraints>
    </GridPane>

    <HBox alignment="CENTER_RIGHT" spacing="10">
        <Button defaultButton="true" onAction="#handleSave" text="保存" />
        <Button cancelButton="true" onAction="#handleCancel" text="取消" />
      <VBox.margin>
         <Insets top="14.0" />
      </VBox.margin>
    </HBox>
</VBox>
