设置图像填充 PyGTK
我使用的是 Python 2.7、PyGTK 2.24 和 Glade 2.8.0。我正在尝试设置图像以(拉伸)填充所有给定空间,但我找不到执行此操作的属性。此外,有时我可能还需要缩小图像以适应。
我该如何在 Glade 中做这两件事?
I'm using Python 2.7, PyGTK 2.24, and Glade 2.8.0. I'm trying to set an image to (stretch to) fill all of the given space, but I cannot find the properties to do that. Furthermore, I may need to shrink images to fit sometimes as well.
How do I do those two things in Glade?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Glade 不允许拉伸图像。这必须在代码中完成,方法是缩放 pixbuf,从中创建像素图和掩码,然后从像素图创建图像。
Glade does not allow for stretching images. This must be done in code, by scaling the pixbuf, creating a pixmap and mask from it, and then creating the image from the pixmap.