Re: position TGMainFrame

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Mon Jan 25 1999 - 11:32:11 MET


Hi Rutger,

   see how a canvas is created and placed:

http://root.cern.ch/root/html/src/TRootCanvas.cxx.html

The second ctor shows sizing and placing of the window.

Cheers, Fons.



Rutger van der Eijk wrote:
> 
> Hi,
> 
> Can't find any doc on this, so maybe somebody tried this already.
> 
> How do I position a TGMainFrame at a controlled position at startup?
> 
> I know I can move it to a certain position by using TGFrame:Move(...). But
> for this to work I (as far as I know) should already have called
> TGWindow::MapWindow which first displays the frame at a 'random' position.
> Not a big deal but I find it rather non elegant to see the window move at
> startup. Is there a way to achieve this?
> 
> I found the members TGMainFrame::SetWMPosition etc.. I tried using
> them but this doesn't seem to have effect (but I might have put them in
> the wrong order). Are these SetWMXXX members for this, and if yes how do
> they work?
> 
> Cheers,
> 
> Rutger van der Eijk

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:28 MET