Re: GTK Custom Widgets



Guillaume Brocker wrote:
> Filipe Apostolo a écrit :
>>> Two possible solutions :
>>> - make your widget inherit from Gtk::HBox
>>> - make your widget inherit from Gtk::Bin, and then add the Gkt::HBox
>>> in the constructor of your widget
> >
>> Can you provide me a link with a example of using Gtk::Bin, I only find
>> Class reference.
>
> The usage of Gtk::Bin is very simple. It allows to have one child
> widget. Here is an example :
>
> class MyWidget : public Gtk::Bin
> {
>   MyWidget()
>   {
>      add( mMyHBox );
>   }
>
> protected:
>   Gtk::HBox m_MyHBox;
> }
>
>
Tanks a lot, I'll try the Bin solution.
Filipe Apóstolo



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