Re: [gtkmm] it´s driving me mad ... (replacing contents of VBox)



Am 2004.02.15 17:48 schrieb(en) Andreas B. Thun:
Hi Martin,

thx for your reply.

My VBox is part of a scrolled window.
I just donīt 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();

Yep.

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();

Not quite. Try:

delete myBox;
myBox = Gtk::manage(new Gtk::VBox());
myBox->pack_start(widget4);
myBox->pack_start(widget5);
myBox->pack_start(widget6);
myBox->show_all();  // or myBox->show_all_children(). Not sure.
m_scrolledParamWindow.add(*myBox);

Regards,

 Martin



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