[Glade-users] notebook tabs
Tristan Van Berkom
tristan.van.berkom at gmail.com
Mon May 11 22:22:26 EDT 2009
On Mon, May 11, 2009 at 7:54 PM, Chris Bare <chris at bareflix.com> wrote:
> I'm creating an interface in glade and using gktbuilder to load it.
> One of the elements is a notebook whose tabs will be generated at runtime
> based on data read from a file.
> It seems that even if I delete all tabs in glade, the notebook appears with 1
> tab when I start my app.
Really ? does the Glade file get saved with no tabs ? that could be a
GtkBuilder bug...
> If I delete that tab in the code, the whole notebook disappears.
That's right, a container in GTK+ will normally have a size request
of 0 if there are no children, if you want a blank empty space - you
should set it to expand/fill in its parent box or table, you may optionally
want to put a label in its place as well when there are no pages (or put
a label in the first page, and hide the tabs when there is only one page...)
[...]
> For my particular application the contents of each tab is just going to be the
> same scrolled text box, so it was convenient to create that in glade.
In that case you should create a template for that notebook page to load
from GtkBuilder, you might prefer to keep the template in a separate file
since gtk_builder_add_from_file() currently wont pull in object references in
the same file when cherry picking objects (i.e. it will only build the
specified
object and its children).
Cheers,
-Tristan
More information about the Glade-users
mailing list