Re: [gtkmm] it´s driving me mad ... (replacing contents of VBox)
- From: "Andreas B. Thun" <abt gmx de>
- To: Martin Schulze <martin-ml hippogriff de>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] it愀 driving me mad ... (replacing contents of VBox)
- Date: Sun, 15 Feb 2004 17:48:29 +0100
Hi Martin,
thx for your reply.
My VBox is part of a scrolled window.
I just don愒 know how to remove a widget
from a scrolled window...
To follow your hint I do:
myBox = Gtk::manage(new Gtk::VBox());
myBox->pack_start(widget1);
myBox->pack_start(widget2);
myBox->pack_start(widget3);
m_scrolledParamWindow.add(*myBox);
show_all();
Then I should do:
m_scrolledParamWindow.add(*myNewBox);
myBox->pack_start(widget4);
myBox->pack_start(widget5);
myBox->pack_start(widget6);
// I should delete myBox from scrolledWindow
m_scrolledParamWindow.add(*myNewBox);
show_all();
You assign a pointer, but you don't change the widget tree.
You must first remove the old VBox and then add the new one
to the parent widget. To remove and destroy a widget use
delete. (I'm not sure whether this works with Gtk::manage() -
you'll have to try.)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]