tags:

views:

28

answers:

2

How do I force a GTK window object to stay the same size, even when a table inside of it tries to expand?

I've tried using gtk.SHRINK when attaching children to the table, but the TextViews within the table still keep expanding to way beyond an acceptable width and expanding the window along with it.

A: 

Text views won't expand if you pack them into a gtk.ScrolledWindow. This is not what you directly asked, but I believe should solve your problem in a better way.

doublep
This would probably work too, but I don't want the window to be scrollable. Thanks, though.
Dominique
A: 

You can set the size manually

pyGtk window docs: http://www.pygtk.org/docs/pygtk/class-gtkwindow.html

Wayne Werner
Thanks. I had tried using window.resize(), but that didn't work originally. In the end, window.set_size_request() worked out nicely. :)
Dominique