GTK窗口调整大小禁用,不会回到默认值 [英] GTK window resize disable without going back to default

查看:558
本文介绍了GTK窗口调整大小禁用,不会回到默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有这个应用程序有点太小,所以我试图调用 gtk_window_resize()来调整它的大小。问题是当我调用 gtk_window_set_resizable()并传递FALSE时,窗口无法调整大小,我恢复为默认大小:太小。



有没有办法让一个永久调整大小的不可调整窗口?

解决方案

gtk_window_set_resizable (window,FALSE)将禁用窗口的所有大小调整,甚至可以调整以编程方式启动的大小。相反,请在其中设置窗口或小部件的大小请求。


So I have this app that's a wee bit too small and so I'm trying to call gtk_window_resize() to, well, resize it. Problem is when I call gtk_window_set_resizable() and pass FALSE, being window not resizable, I revert back to my default size: too small.

Is there a way to have a permanent resized unresizable window?

解决方案

gtk_window_set_resizable(window, FALSE) will disable all resizing of a window, even resizing that you initiated programmatically. Instead, set the size request of the window or a widget within it.

这篇关于GTK窗口调整大小禁用,不会回到默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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