我可以在Delphi和HTML中使用多列Radio组吗?

Maw*_*awg 2 html css delphi

我可以在Delphi和HTML中使用多列Radio组吗?

Bha*_*rat 6

在Delphi中,RadioGroup具有可以设置的Columns属性.

下面的代码将设置3列

RadioGroup1.Columns := 3;
Run Code Online (Sandbox Code Playgroud)


Uwe*_*eim 5

在HTML中,您可以通过简单地将您喜欢的单选按钮放在表格中来定义自己的布局,例如:

<table>
    <tr>
        <td>
            <input type="radio" name="group1" value="Milk">Milk<br />
            <input type="radio" name="group1" value="Butter">Butter<br />
            <input type="radio" name="group1" value="Cheese">Cheese
        </td>

        <td>
            <input type="radio" name="group1" value="Water">Water<br />
            <input type="radio" name="group1" value="Bread">Bread<br />
            <input type="radio" name="group1" value="Soda">Soda
        </td>
    </tr>
</table>
Run Code Online (Sandbox Code Playgroud)

对于Delphi部分,我不知道,因为我不熟悉Delphi.

如果它与Windows Forms类似,我认为你只需使用可视化设计器将单个单选按钮放在你喜欢的任何位置.