Sets the sensitivity of a widget. A widget is sensitive if the user
can interact with it. Insensitive widgets are “grayed out” and the
user can’t interact with them. Insensitive widgets are known as
“inactive”, “disabled”, or “ghosted” in some other toolkits.
您必须将按钮打包到事件框中。在
然而,这让我想知道你想做什么。见@JoseFonte答案。在
这就是小部件不敏感的含义。如果是这样的话,它们就不会向事件发出信号,你也无法与它们进行交互。在
在某些情况下,您希望小部件不敏感,例如,想象一下身份验证对话框中的“登录”按钮,但是您只希望在用户名和密码都不为空的情况下允许登录。然后您可以检查条目内容,如果没有条目为空,则将“Login”设置为敏感。在
从Python API-Gtk.Widget set_sensitive方法:
相关问题 更多 >
编程相关推荐