Re: forcing window/widget sizes



	Hi, list!

	I am using sawfish and i have never had any problem with the size
of my windows or widgets. I show you my source (for a 1280x1024 screen):

  //create the main window
  main_window = gtk_window_new( GTK_WINDOW_TOPLEVEL );

  //connect signals with callbacks
  g_signal_connect( G_OBJECT (main_window), "delete_event",
		    G_CALLBACK (gui_file_quit), NULL );
  g_signal_connect_swapped( G_OBJECT (main_window), "destroy",
			    G_CALLBACK (gui_file_quit), NULL );

  //configure its attributes
  gtk_window_set_title( GTK_WINDOW (main_window),
			gui_main_window_title_text );
  gtk_window_set_default_size( GTK_WINDOW (main_window),
			       800, 600 );
  //gtk_window_maximize( GTK_WINDOW (main_window) );

  //show the main window
  gtk_widget_show( main_window );

	If you want to get the window all along the screen, you should use
the maximize api (that what is commented in my source).

	Hope I was useful.

						 Yesterday
				   ----------------------------------------
				   --     Alejandro García Rodríguez     --
				   --  e.mail.       agarcia die upm es  --
				   ----------------------------------------

On Wed, 11 Jun 2003, Teardrop Sky wrote:

> i'm trying to set the window sizes in a program,
> but both of the methods i found via searching the archives didn't work..
> (gtk_window_set_default_size and gtk_widget_size_request)
> i was trying to force it to the current X setting, 1024x768
> but i tried a few different sizes, but it always looked
> the same as if i hadn't put any sizing function in it at all...
> perhaps it's because i'm using sawfish(?) for my wm?
>
> ~sky
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>



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