This happen because you remove the viewport instead the button in your example code. when you call main_area.add(button_test); you add a Gtk::Viewport to the scrolled window, the button is then a child of the viewport. So after the call to main_area.remove(); you remove the viewport and the button is still a child of the viewport.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1055744 Title: can't remove a widget correctly from a Gtk::ScrolledWindow To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gtkmm3.0/+bug/1055744/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs