MFC Radio Button 使用 分组 RadioButton 用法
2014-12-10 14:49
267 查看
1. 环境:VS20102. 分组将radio1、radio2、radio3分为1组,radio4、radio5分为另一组;
方法:设置 radio1 的 属性: group、tabstop、auto均为true设置 radio2 的 属性:
group设为false, tabstop、auto均为true
设置 radio3 的 属性:group设为false, tabstop、auto均为true
设置 radio4 的 属性: group、tabstop、auto均为true
设置 radio5 的 属性: group设为false,tabstop、auto均为true
3. 按CTRL+D,保证同一组内的radio的tab序号是连续的;
调整tab序号的方式是:鼠标点击数字,比如先点3,然后点7,则3和7会交换,即radio1变为7,radio5变为3;
4. 关联int型变量 注意:只需将group属性为true的radio1关联,radio2和radio3无需关联; 同样,radio4需关联,radio5无需关联
5. 第4步完成后,在窗体头文件中可以看到构造函数: 默认第一个radio被选中,即radio1被选中
6. 事件处理设置radio1的事件设置radio2和radio3的点击事件函数 和 radio1 相同事件代码:
注意:updatedata(true) 不能少; 它的作用是 将radio的状态值更新给关联的变量,即m_radiobtngroup1;
感谢关注,欢迎交流!
原文章出处:http://blog.csdn.net/c_cyoxi/article/details/23868979
方法:设置 radio1 的 属性: group、tabstop、auto均为true设置 radio2 的 属性:
group设为false, tabstop、auto均为true
设置 radio3 的 属性:group设为false, tabstop、auto均为true
设置 radio4 的 属性: group、tabstop、auto均为true
设置 radio5 的 属性: group设为false,tabstop、auto均为true
3. 按CTRL+D,保证同一组内的radio的tab序号是连续的;
调整tab序号的方式是:鼠标点击数字,比如先点3,然后点7,则3和7会交换,即radio1变为7,radio5变为3;
4. 关联int型变量 注意:只需将group属性为true的radio1关联,radio2和radio3无需关联; 同样,radio4需关联,radio5无需关联
5. 第4步完成后,在窗体头文件中可以看到构造函数: 默认第一个radio被选中,即radio1被选中
6. 事件处理设置radio1的事件设置radio2和radio3的点击事件函数 和 radio1 相同事件代码:
注意:updatedata(true) 不能少; 它的作用是 将radio的状态值更新给关联的变量,即m_radiobtngroup1;
感谢关注,欢迎交流!
原文章出处:http://blog.csdn.net/c_cyoxi/article/details/23868979
相关文章推荐
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- FAG MFC Radio Button 使用 分组 RadioButton 用法
- Radio Button 使用分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC Radio Button 使用 分组 RadioButton 用法
- MFC分组Radio Button的使用
- MFC Radio Button 使用 分组 RadioButton 用法
- SharePoint内容定制之XSLT高级用法——使用Muenchian方法分组XML数据
- MFC中Radio Button使用方法
- MFC中Radio Button使用方法
- MFC Radio button 的使用
- MFC 控件Radio Button的使用 .
- 文件处理函数如何使用?用法举例,C与MFC
- MFC 中 Radio Button 使用方法
- MFC radio button 的使用方法