开发者

Make a pygtk stock icon "unavailable"

开发者 https://www.devze.com 2023-02-28 22:43 出处:网络
I have a toolbar that has the typical 开发者_StackOverflow中文版buttons: new, save, save as, etc. Is there a way to gray out/disable/make unavailable icons that are not useful?

I have a toolbar that has the typical 开发者_StackOverflow中文版buttons: new, save, save as, etc. Is there a way to gray out/disable/make unavailable icons that are not useful?

For instance, if nothing has been changed, disable and gray out the save button, then re-enabled it when something has changed that requires a save.

Thanks for the help!


myButton.set_sensitive(True) # make button available

myButton.set_sensitive(False) # make button unavailable

0

精彩评论

暂无评论...
验证码 换一张
取 消