>Well, I don't think there is a ready-made method for it. Most of the
>time, you'd just destroy the HBox.
You can empty a box using the boxlist. It's a STL type list attached to the
box that contains its widgets, with the expected methods.
Gtk::Box_Helpers::BoxList PClist = m_PC_data.children();
Gtk::Box_Helpers::BoxList::iterator PCiterbegin= PClist.begin();
Gtk::Box_Helpers::BoxList::iterator PCiterend= PClist.end();
if(PCiterbegin != PCiterend){
PCdata.erase(PCiterbegin, PCiterend);
}
On an unrelated topic, can a Gdk::DrawingArea be put inside another widget?
For example, the clock in the docs works fine as a standalone program. If I
try to put it inside a Frame, the program fails to draw the clock. For
instance, changing the main.cc in the clock example to
#include "clock.cc"
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <gtkmm/frame.h>
int main(int argc, char** argv)
{
Gtk::Main kit(argc, argv);
Gtk::Window win;
Gtk::Frame frame;
win.set_title("Cairomm Clock");
Clock c;
/*win.add(c);*/
win.add(frame);
frame.add(c);
c.show();
Gtk::Main::run(win);
return 0;
}
results in an empty box.
I'm guessing the on_expose_event() that is used in the manual as the only
method for initiating the drawing process is hidden if it's not called on a
top- level window, but I can't see a work-around. Can I pass the event to the
Window somehow?
Ian
Generally, rearranging widgets is sometimes necessary, but overall it's
definitely one of the rarer operations an application usually performs.
I think that in your case, you probably shouldn't change the Gtk::Image
widgets at all, but instead just set a different pixbuf to display.
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list
Need a Holiday? Win a $10,000 Holiday of your choice. Enter
now.http://us.lrd.yahoo.com/_ylc=X3oDMTJxN2x2ZmNpBF9zAzIwMjM2MTY2MTMEdG1fZG1lY2gDVGV4dCBMaW5rBHRtX2xuawNVMTEwMzk3NwR0bV9uZXQDWWFob28hBHRtX3BvcwN0YWdsaW5lBHRtX3BwdHkDYXVueg--/SIG=14600t3ni/**http%3A//au.rd.yahoo.com/mail/tagline/creativeholidays/*http%3A//au.docs.yahoo.com/homepageset/%3Fp1=other%26p2=au%26p3=mailtagline_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list