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

<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>

<VBox spacing="10" xmlns:fx="http://javafx.com/fxml"
      fx:controller="com.zhangmeng.online.exam.ui.controller.OptionEditController">
    <padding>
        <Insets top="10" right="10" bottom="10" left="10"/>
    </padding>

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

        <!-- 选项名称 -->
        <Label text="选项名称:" GridPane.rowIndex="0" GridPane.columnIndex="0"/>
        <TextField fx:id="optionNameField" GridPane.rowIndex="0" GridPane.columnIndex="1"/>

        <!-- 选项内容 -->
        <Label text="选项内容:" GridPane.rowIndex="1" GridPane.columnIndex="0"/>
        <TextField fx:id="optionContentField" GridPane.rowIndex="1" GridPane.columnIndex="1"/>

        <!-- 是否为正确答案 -->
        <Label text="是否为正确答案:" GridPane.rowIndex="2" GridPane.columnIndex="0"/>
        <HBox  GridPane.rowIndex="2" GridPane.columnIndex="1">
            <RadioButton text="是"  fx:id="trueRadioButton" />
            <RadioButton text="否"  fx:id="falseRadioButton" />
        </HBox>


        <!-- 解析 -->
        <Label text="解析:" GridPane.rowIndex="3" GridPane.columnIndex="0"/>
        <TextArea fx:id="explanationTextArea" GridPane.rowIndex="3" GridPane.columnIndex="1"/>


    </GridPane>

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