Re: [gtk-list] window geometry with GTK



On Sun, 25 Jan 1998, Frederic Baumann wrote:

> I am just beginning using GTK, and find it very pleasant !
> 
> After having read the FAQ and the tutorial, I can't find how to force
> the
> position of the main window of my application.
> 
> With X-toolkit based applications, we can use "-geometry ..." on the
> command line or put
> "*.geometry: ..." in the resource file.
> 
> What is the equivalent for GTK ?

You can use gtk_widget_set_usize (GtkWidget *widget, gint x, gint y) to
set the minimum size of the window.

To set it's position, there's a few options.  For automatic placement:

gtk_window_position (GtkWindow *window, GtkWindowPosition position);

Where position is one of:

GTK_WIN_POS_NONE,
GTK_WIN_POS_CENTER,
GTK_WIN_POS_MOUSE

Or, if you want explicit placement, you can use:

gtk_widget_set_uposition (GtkWidget *widget, gint x, gint y);



	Ian




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