Re: GTK Custom Widgets
- From: Filipe Apostolo <f apostolo cbr gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: GTK Custom Widgets
- Date: Tue, 28 Oct 2008 14:14:54 +0000
Larik Ishkulov wrote:
> В сообщении от Tuesday 28 October 2008 15:49:28 Filipe Apostolo написал(а):
>> Hi everybody,
>> I'm trying to do a custom widget to use in more than one app.
>> So I've build a class "MyWidget" derived from Gtk ::Widget :
>> class MyWidget : public Gtk::Widget
>> virtual ~MyWidget();
>> //some Overrides virtual functions
>> Gtk::Hbox mMyHbox_to_add_in_my_widget;
>> But the problem is that I don't know how to add the HBox in my custom
>> So I've looked the
>> tml tutorial but it doesn't explain how to add a child widget into a custom
>> The purpose of adding the Hbox is to heave a kind of container to start
>> adding other widgets like treeviews, buttons, combo boxes and so one.
>> And I don't want to derive from a container or from a window.
>> Can some wane help me, is it possible ore there are more efficient ways
>> to do something like this?
>> Tanks in advance,
>> Filipe Apóstolo.
> Why don't you want to derive from a container?
> I derive from an EventBox for my widgets for glade.
> Larik Ishkulov.
> gtkmm-list mailing list
> gtkmm-list gnome org
I don't want to derive from a container because I do not want to permit
to add more widgets in my on. If I want to add more buttons it must be
added with other container that will heave my widget and the other button.
I supose that I derive from a container the user of my widget could
remove or add child widgets in my widget. Am I right? Is there another
way to do this?
] [Thread Prev