Expand GtkGrid and child widget to fill the whole window

,

I am trying to get a widget to expand the whole window and GtkGrid, but with no luck. I have set the “gtk_widget_set_hexpand” and “gtk_widget_set_vexpand” properties to TRUE on both the button and the grid. Can someone please tell me how to achieve this?

Example source code:

Hi,

Do you want the button to take the whole window allocation?

If yes, adding these lines to your example does the trick:

  gtk_widget_set_hexpand (button, TRUE);
  gtk_widget_set_vexpand (button, TRUE);

Thank you, @gwillems :slight_smile:

1 Like

@gwillems can you still help me with this one? The button works okay, but how about expanding a GtkColumnView?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.