Re: [gtkmm] simple window size question part 2



On Thu, 2004-01-15 at 15:52, Bevis Peters wrote:
OK, let me clarify that a bit.  This code:

  mc_image_window.set_size_request(400, 400);
  mc_image_window.move(0, 0);
  mc_image_window.maximize();
  int w=0, h=0;
  mc_image_window.get_size(w, h);
  cout << w<<", "<<h<<endl;

gets back 400x400, not the windows true maximised size.

what have i missed?

By the time you get to the get_size(), the resize request has not even been sent to the window manager. You will need to add a slot to the "size-allocate" signal , and only then will your window be maximized. Also read the documentation on that method.

Tassos

-- 
Beware of he who would deny you access to information, for in his
heart he dreams himself your master." 
	-- Commissioner Pravin Lal, Sid Meier's Alpha Centauri


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