Re: Contents of VBox don't draw after putting it in Viewport



On Dec 2, 2007 3:07 PM, Jeffrey Barish <jeff_barish earthlink net> wrote:

It's a long shot, but I am hoping that someone might recognize my problem
from this general description.  I tried to reduce my code to a test case,
but it works there.  After spending an entire day on this problem, I am
stumped.


Jeff,
   I dont know exactly what is going on but I can try to give you some
hints. Notebooks are a kind of exception in gtk+ because they actually
map()/unmap() widgets according to which page is showing.

This effects the order in which widgets are initially realized.

If for instance, your toplevel widget is already realized then adding
pages to the notebook (and thier contents recursively) will result in
all pages being realized at the start, on the other hand if your toplevel
is invisible, or your notebook is not anchored at creation time (anchored
means "inside a toplevel somewhere"), then the subhierarchies will
only be realized when those pages are gtk_widget_show()n AND in an
active notebook page.

You might try making sure that all of your pages are realized at the
startup, this would typically mean after glade_xml_new() with a visible
toplevel, you would call gtk_notebook_set_page() for each page provoking
a realize before ever entering gtk_main().

You also might try adding some gtk_widget_queue_draw() sugar.

ofcourse these solutions, if they even turn out to be solutions are not
ideal, but might help pinpoint what is foul in your current setup (or
maybe help us to pinpoint a possible bug in gtk+).

Cheers,
                -Tristan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]