1
votes

I have a Gtk::Grid of 3x3.

Row 1 has Menubar, row 2 has Toolbar and row 3 has a Gtk::Notebook widget.

When I try to add a new page(s) in the Gtk::Notebook widget, it does not fill up the area completely. It looks like this :

enter image description here

The Gtk::Notebook has a Gtk::ScrolledWindow and a Gtk::TextView as child widgets.

What can I do to pack the Gtk::Notebook widget to fill the remaining space to it's bottom and right side ?

In Glade there's a property under "Widget spacing" named "Alignment" and it's Horizontal and Vertical values set to Fill does the job.

enter image description here

Is there some function to do that in code only ?

1

1 Answers

2
votes

I got it working for now. Maybe it's not the best method, but it works.

After adding Gtk::Notebook to Gtk::Grid, call these two functions :

    /* Fill up the extra space avialable */
    m_pNotebook->set_hexpand(true);
    m_pNotebook->set_vexpand(true);