[pygtk] How do I force resize of a top-level window?

Pietro Battiston toobaz at email.it
Fri Dec 18 06:19:07 WST 2009


Il giorno gio, 17/12/2009 alle 21.25 +0330, Saeed Rasooli ha scritto:
> I think this is what you need: if the three zones are placed
> vertically(one below other), then set a "height-request" to every
> zone(the fixed height that it need). and pack every zone with
> expand=False and fill=False. for exmaple:
> _______________________________________
> 
> ## first Create three widgets zone1, zone2, zone3, and then...
> 
> zone1.set_property('height-request', 200)
> zone2.set_property('height-request', 200)
> zone3.set_property('height-request', 200)
> 
> vbox = gtk.VBox()
> win = gtk.Window()
> 
> ## Now pack them will NO EXPAND and NO FILL options

I'm afraid it's not enough. The window will leave some empty space, it
won't shrink.

But indeed, at this point you can call resize(1,1)

Pietro



More information about the pygtk mailing list