Re: libglademm with my own customised class???
- From: "Dodji Seketeli" <dodji gnome org>
- To: "Xiangfei Jia" <xjianz gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: libglademm with my own customised class???
- Date: Mon, 8 May 2006 10:12:27 +0200
Hello,
I am not sure you can directly layout your own class with glade.
You would have to change glade-2 somehow, to make it know about
your custom class.
What I usually do in that case is to put a box (like GtkVBox)
in my layout (at the place where I'd like to pack the DisplayPlot),
and call it "mydisplayplotcontainer" (for instance).
Then load the the box:
Gtk::Box *the_container = Gnome::Glade::Xml::get_widget
("mycustomclasscontainer") ;
//then, pack your DisplayPlot
DisplayPlot *plot = Gtk::manage (new DisplayPlot) ;
the_container->pack_start (*plot) ;
And that's it. It just takes two more lines of code, roughly.
Cheers,
Dodji.
http://goupil.tuxfamily.org
On 5/8/06, Xiangfei Jia <xjianz gmail com> wrote:
I use glade2 to do the layout and use libglademm to load the layout.
Sometimes, I need to have my own customised class, like I have a DisplayPlot
class wich inherited from class Gtk::DrawingArea. I want to know if it's
possible to use glade to lay out my own customised class.
Thanks!!!!!
Fei
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]