I want to put a grid inside a fullscreen window.
Labels, entrybars and the button are the widgets attached in the grid. I want to limit the size of grid into something like 350, 200, and place it at the center of the screen. I tried to use height-request and width-request, but they are not working.
Builder.ui looks like this:
<object id="grid" class="GtkGrid">
I assume the grid is the immediate child of the window. In your case, changing the size of the grid is not what you want. Instead, you want to change the alignment of the grid in its parent from
GTK_ALIGN_CENTER in both the horizontal and vertical directions.
In Glade, you can do this near the bottom of the Common tab for the grid.
If this does not work, try putting the grid in another container, such as a GtkBox, and then make that the child of the window, and then make the grid's
TRUE (in the same place in Glade).