RE: [gtkmm] Problems adding a custom widget



Sorry for putting so much code, here is the relevant code:


I'm trying to add a custom drawingarea widget into a container with this code:


 this->ds = Gtk::manage(new class drawingarea_custom());
 this->dsz = Gtk::manage(new class drawingarea_custom());
 this->dh = Gtk::manage(new class drawingarea_custom());
 this->dhz = Gtk::manage(new class drawingarea_custom());

 this->dp = Gtk::manage(new class drawingarea_custom());

 this->ds->set_size_request(-1,-1);
 this->dsz->set_size_request(-1,-1);
 this->dh->set_size_request(-1,-1);
 this->dhz->set_size_request(-1,-1);
 this->dp->set_size_request(-1,-1);

 this->hbox_s->pack_start(*this->ds);
 this->hbox_sz->pack_start(*this->dsz);
 this->hbox_h->pack_start(*this->dh);
 this->hbox_hz->pack_start(*this->dhz);

 this->hbox_prueba->pack_start(*this->dp);

Although it compiles well when I execute the code, the custom drawingarea doesn't appear.
Instead it has a weird behavior, there appear separated windows.


How can I put a custom widget into the HBox-es?
Those HBox are into a Hpaned/Vpaned widget created with glade.

_________________________________________________________________
Encuentra a tu media naranja entre los perfiles que más te gusten. Toda la magia del romance en MSN Amor & Amistad. http://match.msn.es/




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