On Thu, 22 May 2008 14:49:12 -0700
Mitko Haralanov <[EMAIL PROTECTED]> wrote:

> What I have is a main application window which contains a
> notebook. Each of the notebook pages contains a table. When the main
> window is resized, the notebook (and the tables on the pages) get
> resized. I would like to be able to find the actual width and height of
> the table in the GtkNotebook page.
> 
> I have tried using GtkWidget.get_allocation() but that returns the same
> number regardless of how much I resize the main window.

OK, I did more digging around and it turned out that I wasn't really
understanding the situation correctly.

Here is what is actually going on:

When the main window is constructed, I used gdk.Window.move_resize() to
change the size and position of the main window to a user-specified
values. When this happens, the size of the GtkTable inside the
GtkNotebook changes from their default size.

However, the new size does not become "active" until gtk.main() is
called, which results in my inability to find a way to get the new size
before I have entered the main loop.

Unfortunately, as part of the main window construction, I insert a
bunch of widgets into the table, which is why I need the its size.

Can anyone give me some advice about how to go about getting the table
size?

-- 
Mitko Haralanov
==========================================
Real computer scientists don't comment their code.  The identifiers are
so long they can't afford the disk space.
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to