如何在一个组中设置两个单选按钮,并在另一个组中设置两个单选按钮?(How to set two radiobuttons in one group and two in another group?)

编程入门 行业动态 更新时间:2024-10-25 11:26:19
如何在一个组中设置两个单选按钮,并在另一个组中设置两个单选按钮?(How to set two radiobuttons in one group and two in another group?)

我的表单上共有4个单选按钮,我想将前两个按钮设置在一个组中,而将另外两个按钮设置在另一个组中,以便我可以检查第一组中的一个和第二组中的一个。

现在,如果我检查第一组中的一个,则第二组中的一个变得未选中。

我一直想知道如何做到这一点,我相信现在是时候弄清楚了。 :)

I have total 4 radiobuttons on my form,I want to set the first two buttons in one group and the second two in another group so that I can check one from the first group and one from the second group.

Right now,if I check one from the first group,the one from the second group becomes unchecked.

I've always wondered how to do this and I believe now's the time to figure this out. :)

最满意答案

引用可信的Delphi 5帮助:

默认情况下,将直接包含在同一窗口控制容器(例如TRadioGroup或TPanel )中的所有单选按钮分组。 例如,表单上的两个单选按钮只能在包含在单独的容器(如两个不同的组框)中的情况下同时进行检查。

To quote from the trusted Delphi 5 help:

By default, all radio buttons that are directly contained in the same windowed control container, such as a TRadioGroup or TPanel, are grouped. For example, two radio buttons on a form can be checked at the same time only if they are contained in separate containers, such as two different group boxes.

更多推荐

本文发布于:2023-07-22 19:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222740.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单选   组中   按钮   两个   并在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!