Hi, I am a bit confused about how widgets are drawn, more specifically, when is a size allocation made and assigned to a widget.
For example, I have the following widget tree:
GtkNotebook +-> GtkPaned +-> GtkScrolledWindow +-> GtkNotebook
What I would like to be able to do is set the GtkPaned separator to a specific value when adding it as a child of the GtkNotebook. In order to do that, I use the following sequence of calls:
gtk_notebook_append_page(notebook, paned, "New Page"); gtk_widget_show_all(notebook); gtk_widget_get_allocation(paned, &allocation); gtk_paned_set_position(paned, allocation.height - allocation.height * SPLIT);
However, what I am seeing is that the values in
allocation for height and width are
1 instead of something reasonable.
One other detail is that the parent of the top level GtkNotebook and its parent are shown/visible, as well.
I thought that if all of the widgets in the tree are visible, the page child widget would have had an allocation assigned to it. Is that not true?