Re: RE:Resizing



Seems to be well documented in the doc.
gtk_window_set_policy allows the window to be shrinked or growed.

On Fri, 12 Oct 2001 13:03:19 +1000, Kevin Heaton said:

> I am quite new to gtk so this might sound like a sill question but
>  how do you set a window to be able to resize or not resize.
>  You create it like below.
>  
>  GtkWidget *main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
>  main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
>  gtk_object_set_data(GTK_OBJECT(main_window), "main_window",
>  		      main_window);
>  
>  gtk_widget_set_usize(main_window, 550, 0);
are you sure?----------------------------------^
now just give
-> gtk_window_set_policy(GTK_WINDOW(main_window), TRUE, TRUE, FALSE);

You should now be able to resize your win :) .

>  gtk_window_set_title(GTK_WINDOW(main_window), _("Main"));
>  
>  Also what does gtk_window_set_policy() actually do.
>  
>  Any help would be much appreciated.
>  Thanks in advance Kevin
>  
>  
>  
>  
>  
>  

You really should read the doc (download it on gtk.org for offline reading).
Regards
Tâm





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