Re: setting maximum window size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2003-06-17 at 04:44, Nick Soffe wrote:
> Hi,
> I would like to restrict the maximum width of the top level window in an
> application I've written for gtk2.x. I don't want to prevent the user from
> resizing altogether. The window contains various resizable widgets
> including a drawingarea on which I've set the minimum size with a
> gtk_widget_set_size_request. Sorry if this is well known but after
> searching the docs I'm still unsure of the correct way to achieve this
> under gtk2.x.

Try something like:

GdkGeometry geometry;
geometry.max_width = my_maximum_width;
geometry.max_height = G_MAX_SHORT;
gtk_window_set_geometry_hints (GTK_WINDOW (my_window),
                               NULL,
                               &geometry,
                               GDK_HINT_MAX_SIZE);

--
Shaun



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux