当前位置:网站首页>C# winform 单选框
C# winform 单选框
2022-08-10 01:18:00 【ou.cs】
private void radioButton_Click(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
for (int i = 0; i < radioGroup.Controls.Count; i++)
{
#region 1.一个单选框被选中时,另一个改变状态
if (radioButton != radioGroup.Controls[i])
{
(radioGroup.Controls[i] as RadioButton).Checked = false;
}
else
{
state = i;
}
#endregion
}
}
foreach (RadioButton item in radioGroup.Controls)
{
item.Click += new EventHandler(radioButton_Click!);
}
(radioGroup.Controls[0] as RadioButton)!.Checked = true;
边栏推荐
猜你喜欢
随机推荐
Unity顶点动画
Unity editor extension interface uses List
Initial attempt at UI traversal
eyb:Redis学习(4)
STM32F103驱动HCSR04超声波测距显示
Initial attempt at UI traversal
sql实战积累
JDBC数据库连接池练习题
[论文阅读] Multimodal Unsupervised Image-to-Image Translation
hint: Updates were rejected because the tip of your current branch is behind hint: its remote counte
【kali-密码攻击】(5.2.1)密码分析:Hash Identifier(哈希识别)
Chip Information|Semiconductor revenue growth expected to slow to 7%, Bluetooth chip demand still growing steadily
微信小程序tab切换时保存checkbox状态
万字总结:分布式系统的38个知识点
web开发概述
【Grpc】简介
Research on Ethernet PHY Chip LAN8720A Chip
Sikuli 基于图形识别的自动化测试技术
首次在我们的centos上安装MySQL
Maya制作赛博朋克机器人模型





![[转] Typora_Markdown_图片标题(题注)](/img/67/589eed8de86bff9fc017ae7c409410.png)



