One of the big changes in gtkmm3:
Gtk::Box, Gtk::ButtonBox, Gtk::IconView, Gtk::Paned, Gtk::ProgressBar, Gtk::ScaleButton, Gtk::ScrollBar and Gtk::Separator now derive from Gtk::Orientable, allowing their orientation (vertical or horizontal) to be specified without requiring the use of a derived class such as Gtk::HBox.
Although Grid isn't mentioned above, both containers now have a method set_orientation; Box can also take it in the constructor. So for Box, set the orientation and use your usual pack_start
, pack_end
.
With Grid, if you scrutinize the documentation, you'll see this line:
Grid can be used like a Box by just using Gtk::Container::add(), which will place children next to each other in the direction determined by the orientation property.
So, it should be as simple as setting the orientation and then add
your child widgets.