在c#中对radiobuttons进行分组 [英] grouping radiobuttons in c#

查看:396
本文介绍了在c#中对radiobuttons进行分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个tableLayoutPanel,其中包含22个radiobuttons.i想要将这些radiobutton分组为两个。可以在C#中使用代码隐藏分组吗?

i have a tableLayoutPanel that contains 22 radiobuttons.i wanna group these radiobuttons by twos.Can i group in codebehind in C#?

推荐答案

是的:只需将它们放入在另一个控件内: GroupBox [ ^ ]是一个不错的选择。 />


RadioButtons自动充当单个控件中的一个组,因此如果每个组合在一个单独的GroupBox中,它们将只相互影响。
Yes: Just put them inside a different control: a GroupBox[^] is a good choice.

RadioButtons automatically act as a group within a single control, so if each set of two is in a separate GroupBox they will affect only each other.


这篇关于在c#中对radiobuttons进行分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆