Contents of VBox don't draw after putting it in Viewport
- From: Jeffrey Barish <jeff_barish earthlink net>
- To: gtk-app-devel-list gnome org
- Subject: Contents of VBox don't draw after putting it in Viewport
- Date: Sun, 02 Dec 2007 10:07:24 -0700
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.
I have a bunch of labels and entries in a vbox. I added the vbox to page 1
of a notebook (the second page). Everything worked fine. I encountered a
situation in which some of the labels and entries did not fit on the page,
so I put the vbox in a viewport, the viewport in a scrolledwindow, and I
added the scrolledwindow to the notebook instead of the vbox. Now when I
go to the mode in which the notebook is visible I find that page 0 appears,
but when I select page 1 I see nothing. If *after exposing (the blank)
page 1* I leave the mode in which this notebook is active and then return,
the contents do appear. The contents appear promptly when I add the vbox
to the page directly, but when the same vbox is inside a scrolledwindow
with viewport they appear only after trying once to view them, switching to
a mode in which the notebook is not visible, then returning.
My first thought was show_all. However, if that were the problem then it
would not work to leave and return. In any case, I do a show_all on the
scrolledwindow.
I modified the code so that page 1 appears initially when I enter the mode
in which the notebook is visible. In that case, the contents of page 1
appear immediately, but when I switch to page 0 I now see none of the
widgets that reside inside the scrolledwindow with viewport on that page (a
combobox that is not inside the scrolledwindow with viewport is visible).
(And incidentally, I cannot make them appear by leaving the mode in which
the notebook is visible and returning, although that procedure does make
the contents of page 1 appear in the unmodified code. However, when I
activate the combobox, the contents of page 0 appear instantly.) If I
further modify the code so that the vbox on page 0 is added directly to
page 0 without the scrolledwindow with viewport, then all the contents of
page 0 appear as soon as I select page 0. The problem seems to be related
to a scrolledwindow with viewport on a hidden page of a notebook. However,
in my test program I put a bunch of labels in a vbox in a viewport in a
scrolledwindow on two pages of a notebook and both pages appear without
coaxing.
Any suggestions greatly appreciated.
--
Jeffrey Barish
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]