GtkContainer problems



Hello.

I'm writing a custom widget. It's inherits from GtkContainer. So:

typedef struct _MyWidget            MyWidget;
typedef struct _MyWidgetClass       MyWidgetClass;

struct _MyWidget
{
  GtkContainer parent;
};

struct _MyWidgetClass
{
  GtkContainerClass parent_class;
};

I'm wrote a small test program:

[...]
mywidget = mywidget_new ();
gtk_container_add (GTK_CONTAINER (mywidget), button);
[...]

But I got a message:

Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_CONTAINER (container)' failed

Why?

Thank you.



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