Re: Position of TRootHelpDialog

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Mon Jun 21 1999 - 17:33:50 MEST


Hi Paul,

   because the default placement algorithm is:

  main->GetWidth() - (fWidth >> 1)
  (main->GetHeight() - fHeight) >> 1

where main is gClient->GetRoot() which has width and height the full screen
size.
So your help window is by default placed at the right side of main with the help
window half overlapping and height is exactly in the middle of the window.

To place the window on a custom location just do:

   hd->Move(x, y)

before calling Popup().

Cheers, Fons.



Paul Nord wrote:
> 
> Good Day,
> 
> If I do this:
> 
> root [0] hd = new TRootHelpDialog(gClient->GetRoot(),"Help Window", 400, 400);
> root [1] hd->Popup();
> 
> I get a help window that pops up on the far right edge of my screen.  Why?
> 
> Paul

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



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