Anon
Anon

Reputation: 737

Python Window Resize

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.

Upvotes: 5

Views: 3566

Answers (1)

nosklo
nosklo

Reputation: 222852

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()

Upvotes: 7

Related Questions