开发者

gtk_widget_set_sensitive on Close Window button

How would you change the sensitivity of the close window button (the X in the top right corner of the window)?

开发者_Go百科Is it possible? It seems like the X button isnt really a widget and therefore cant be passed to this function.

I know there is gtk_window_set_deletable to completely remove the X button but that isnt an option that is available.

Thank you.


You can't. The close button isn't a widget; it is controlled by the window manager, not by GTK. The solution is to catch the delete-event event and block it, as Federico Culloca suggests.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜