please see the documentation for gtk_window_set_geometry_hints () : http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-set-geometry-hints
If you set min_width and max_width to the same value (e.g. the one returned by gtk_widget_size_request (http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-size-request) then your window will not be able to resize horizontally.
There might be some problems if you set min_width and max_width to some positive value and use -1 for max_height (I am not sure if this is because of a broken wm or a bug in gtk itself). If you run into this problem, use G_MAXSHORT for unrestricted max_height.
Regards,
Steffen
David J. Singer wrote:
I've been away from this list for a while. Hope no one will mind if I drop straight back in with a question...
Is it possible to make a window resizable in only one direction? I have a drawing area with a fixed width and variable height. I've got it in a window with a scrollbar
and it all works fine - except I only want the user to be able to resize the window
in a vertical direction.
I could never figure out how to do this back at version 1.2. Now I'm porting some
of my old Gtk-1.2 stuff to Gtk-2.0 and, even with the new functions, I can't see how to do it..
Anyone know?
_______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list