Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Window Resize

Tags:

python

pygtk

gtk

Using Python + PyGTK. Is there a signal/event way of checking for a window resize? If so then what is the easiest way of implementing and using this signal.

like image 300
Anon Avatar asked Jul 31 '10 22:07

Anon


1 Answers

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()
like image 117
nosklo Avatar answered Sep 18 '22 20:09

nosklo