Re: How to put widget in CUSTOM GtkContainer



On Tue, 2008-04-29 at 18:03 +0400, AlannY wrote:
> Milosz Derezynski wrote:
> > I don't believe that using set_parent() will actually place the widget 
> > inside the container; try gtk_container_add(GTK_CONTAINER(grid), 
> > widget); instead
> 
> I don't believe in it too ;-) So I decide to ask what to do ;-)
> gtk_container_add not works ;-)

could you please stop wincing? it's neither funny nor appropriate.

you're not implementing the GtkContainer virtual functions. you're also
adding a GdkWindow to a container widget - which is not recommended.

you should read the tutorial on how to subclass a GObject first:

  http://library.gnome.org/devel/gobject/stable/howto-gobject.html

and then read the documentation and implementations of GtkContainer,
starting with something simple like GtkBin.

you might also ponder on switching to another language altogether.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net



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