GTK+ FAQ
<<< Previous | Development with GTK+: general questions | Next >>>

# How do I set the size of a widget/window? How do I prevent the user resizing my window? [GTK 2.x]

The `gtk_widget_set_size_request()` function is used to set the size of a widget to a specific size. The function `gtk_window_set_resizable()` function sets whether the user can resize a window, which they can by default. The definition of these functions are:

    void gtk_widget_set_size_request (GtkWidget *widget,
                                      gint       width,
                                      gint       height);

    void gtk_window_set_resizable (GtkWindow *window,
                                   gboolean   resizable);

<<< Previous | Home | Next >>>
How could I get any widgets position? | Up | How do I add a popup menu to my GTK+ application?