Re: [pygtk] force window to resize to show all enclosed widgets?
Quoting Joe Van Andel [EMAIL PROTECTED]: Using gtk+-1.2.7,glib-1.2.7,gnome-python-1.0.53 on Redhat 6.1 I have a toplevel window that initially shows some status messages. After it processes some data, it creates a table of widgets that control the rest of the application. The number of rows in the table depends on the data. How do I force the window to grow to the proper size such that all the rows in the table are visible? (I know that if I had created all the widgets before the window was first created that the window would show them all.) Call window.queue_resize(). When the mainloop is run the next time (I don't know if mainiteration() will work; probably not) the window will recalculate its size. -- == Sowatec AG, CH-8330 Pfäffikon (ZH) Witzbergstr. 7, http://www.sowatec.com Tel: +41-(0)1-952 55 55 Fax: +41-(0)1-952 55 66 -- Aaron "Optimizer" Digulla, [EMAIL PROTECTED] == - This mail sent through IMP: www.hepe.com - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] force window to resize to show all enclosed widgets?
On Thu, May 25, 2000 at 09:59:47AM -0600, Joe Van Andel wrote: I have a toplevel window that initially shows some status messages. After it processes some data, it creates a table of widgets that control the rest of the application. The number of rows in the table depends on the data. How do I force the window to grow to the proper size such that all the rows in the table are visible? (I know that if I had created all the widgets before the window was first created that the window would show them all.) Call window.queue_resize(). When the mainloop is run the next time (I don't know if mainiteration() will work; probably not) the window will recalculate its size. I tried window.queue_resize(), but it made no difference. I also tried the following, where self.__table is packed inside self.__vbox, and it didn't help, either. ?? That's very strange :-/ Are you sure the new added widgets are visible ? Try to reduce the code to the smallest possible demo (ie. a table with a button and that button adds a row to the table). Also, did you call table.resize() with the new number of rows and columns ? -- Aaron "Optimizer" Digulla Sowatec AG, Witzbergstr. 7 "(to) optimize: Make a program faster 8330 Pfäffikon, Switzerland by improving the algorithms rather http://www.sowatec.com than by buying a faster machine." mailto:[EMAIL PROTECTED] - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] force window to resize to show all enclosed widgets?
On Fri, 26 May 2000, Aaron Optimizer Digulla wrote: On Thu, May 25, 2000 at 09:59:47AM -0600, Joe Van Andel wrote: I tried window.queue_resize(), but it made no difference. I also tried the following, where self.__table is packed inside self.__vbox, and it didn't help, either. ?? That's very strange :-/ Are you sure the new added widgets are visible ? Try to reduce the code to the smallest possible demo (ie. a table with a button and that button adds a row to the table). Also, did you call table.resize() with the new number of rows and columns ? In situations like this, I would also recommend trying another window manager. Sometimes buggy window managers can cause problems like this. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] force window to resize to show all enclosed widgets?
Using gtk+-1.2.7,glib-1.2.7,gnome-python-1.0.53 on Redhat 6.1 I have a toplevel window that initially shows some status messages. After it processes some data, it creates a table of widgets that control the rest of the application. The number of rows in the table depends on the data. How do I force the window to grow to the proper size such that all the rows in the table are visible? (I know that if I had created all the widgets before the window was first created that the window would show them all.) I tried: self.hide() while events_pending(): mainiteration() self.show() while events_pending(): mainiteration() The window briefly disappeared, but then re-appeared with the old size. By the way, is there a FAQ for Gtk+ available? The FAQ on www.gtk.org seems empty. -- Joe VanAndel National Center for Atmospheric Research http://www.atd.ucar.edu/~vanandel/ Internet: [EMAIL PROTECTED] - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]