有没有办法取消选中组中的所有单选按钮? (PyGTK的) [英] Is there a way to uncheck all radio buttons in a group? (PyGTK)

查看:117
本文介绍了有没有办法取消选中组中的所有单选按钮? (PyGTK的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法用PyGTK取消选中组中的所有单选按钮?在启动时没有检查单选按钮,所以我认为必须有一种方法将它们全部返回到未检查状态。

不应该有。就其性质而言,单选按钮组是一种挑多种控制类型之一。从人的角度来看,这个想法是,他们中的一个总是被选中。该框架确实应该强制执行,所以对于该组来说实际上不应该是未选定状态。单选按钮组的非选中状态(在可能的框架中)对用户来说非常混乱,因为这不是他们可以控制的状态。



如果你想要一个'没有选择'的状态,我会说你应该给这个组添加一个'none'元素,或者选择一个符合你想要的控制类型。

Is there a way to uncheck all radio buttons in a group with PyGTK? No radio buttons are checked on startup, so I think there must be a way to return them all to that unchecked state.

解决方案

There shouldn't be. By their nature, a radio button group is a 'pick one of many' type of control. From a human perspective, the idea is that one of them is always selected. The framework really should enforce that, so there really shouldn't be a 'none selected' state for the group. The none-selected state of a radio button group (in frameworks where it's possible) is very confusing to users, because that's not a state that they can get the control into.

If you want a 'none selected' state, I'd say you should add a 'none' element to the group, OR chose a different control type that conforms to what you want to do with it.

这篇关于有没有办法取消选中组中的所有单选按钮? (PyGTK的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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