swaping child widgets
- From: Christopher Harvey <chris basementcode com>
- To: "gtkmm-list" <gtkmm-list gnome org>
- Subject: swaping child widgets
- Date: Mon, 17 Aug 2009 04:49:22 -0400
Hi list,
I've got a gtk Vpaned widget, and I'm trying to change the child widget in the
second widget slot. Here is the code I'm currently using to do this.
void handleGraphChange() {
Gtk::Widget *tmp = g_area->getSelectedNode()->createObjectInfoPanel();
//tmp is owned by this scope.
g_sceneTab->add2(*tmp); //may or may not already have a widget.
tmp->show_all();
//delete previous widget and manage the new one.
g_currentNodeInfo.reset();
g_currentNodeInfo = boost::shared_ptr<Gtk::Widget>(tmp);
}
The behavior here is pretty strange, even though this is the only code that
touches the 2nd part of the parent vpaned widget it only displays the added
widget every second time one is added. Every other time the vpaned box
disappears completely and only the 1st wigdet is displayed.
thanks,
Chris.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]