Re: Adding a Frame to a HBox
- From: Bob Caryl <bob fis-cal com>
- To: Marco <mscholtn xs4all nl>
- Cc: gtkmm general discussion <gtkmm-list gnome org>
- Subject: Re: Adding a Frame to a HBox
- Date: Thu, 10 Nov 2005 14:30:45 -0600
Marco wrote:
On Thu, 10 Nov 2005 10:31:47 -0600, Bob Caryl <bob fis-cal com> wrote:
Marco Scholten wrote:
----- Original Message ----- From: <mail gehli com>
To: <jalqadir netscape net>; <gtkmm-list gnome org>
Sent: Thursday, November 10, 2005 9:22 AM
Subject: Re: Adding a Frame to a HBox
you have to use the pack_start or pack_end function described in
the Gtk::Box reference, to add a frame to a box...
Not necessarily, from Gtk::Box reference:
Because Gtk::Box is a Gtk::Container, you may also use
Gtk::Container::add() to insert widgets, and they will be packed as
if with pack_start(). Use Gtk::Container::remove() to remove widgets.
source:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Box.html
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
If you use the "add" method, then you can add no further objects to
the hbox container. This is why you want to use pack_start or
pack_end. Bob Caryl
Since this contradicts what the documentation says i decided to try it,
I tried to pack several widgets into a VBox using the "add" method and
it works exactly like using pack_start, i can "add" more than one widget
without any problem.
Just to be sure i checked the gtk+ source and it turns out that add
simply
calls pack_start
static void
gtk_box_add (GtkContainer *container,
GtkWidget *widget)
{
gtk_box_pack_start_defaults (GTK_BOX (container), widget);
}
Why do you think "add" is limited to one widget?
--
Marco
I think this because in the version of gtkmm (2.6.2) that I'm using
because it fails and generates a warning message in the console window
of my IDE.
Bob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]