Re: Position of TRootHelpDialog

Fons Rademakers (Fons.Rademakers@cern.ch)
Mon, 21 Jun 1999 15:33:50 +0000


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