Re: custom widget

Another question:

how would I include child widgets inside my custom widget? I see that a Gdk::Window is used there (not a Gtk::Window). But, set_parent() only accepts descendants of Gtk::Widget.

So, my general question is: how would I use a Gtk::Widget in a 'child widget' manner, so as to attach to the Gdk::Window inside my custom widget to it as a parent, and then draw the widget inside the Gdk::Window?

I'm not sure if i understand correctly but if you want a widget inside your custom widget then i think you should derive your custom widget from a Gtk::Container type widget instead of a Gtk::Widget.


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