开发者

Python Window Resize

开发者 https://www.devze.com 2023-01-09 22:35 出处:网络
Using Python + PyGTK. Is there a signal/event way of checking for a window resize? If so then wh开发者_运维百科at is the easiest way of implementing and using this signal.a gtk.Window is also a gtk.Co

Using Python + PyGTK. Is there a signal/event way of checking for a window resize? If so then wh开发者_运维百科at is the easiest way of implementing and using this signal.


a gtk.Window is also a gtk.Container, so it answers to the check-resize signal.

Here's minimal sample code:

import gtk

def changed(window):
    print 'I have resized.'

w = gtk.Window()
w.connect('check-resize', changed)
w.show()
gtk.main()
0

精彩评论

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