RE: [ROOT] Placement of canvas and TConbrolBar in Win32

From: Faine, Valeri (fine@bnl.gov)
Date: Tue Mar 12 2002 - 21:01:50 MET


 
Hello Ed,

If I undertstood you right you want to know the current screen 
size.

This information is provided by

TVirtualX::GetGeometry(Int_t wid, Int_t& x, Int_t& y, UInt_t& w, UInt_t& h) 

if "wid < 0" then it returns x=y=0 and the current screen size.
One may call this via the global gVirtualX pointer:

  Int_t x,y;
  UInt_t w,h;
  gVirtualX->GetGeometry(-1, x, y,w,h); 

 Hope this helps,
                            Cheers, Valeri

-----Original Message-----
From: Ed Oltman
To: Roottalk@Pcroot. Cern. Ch
Sent: 3/12/02 9:52 AM
Subject: [ROOT] Placement of canvas and TConbrolBar in Win32

Hello, 

   I have a root application that has a single TCanvas and 3
TContolbars.  Users of the application use a varity of screen sizes:
1024 x 768 through 1600 x 1200.  I would like the TControbar objects
(vertical) on one side of the screen - taking up as much space as needed
and have the TCanvas on the other side, using the remaining real estate.
Obviously, the user can do this themselves, but it would be nice if the
windows could be positioned programatically.  I have experimented with
the TCanvas and TControlbar ctors position arguments, but I have not
discovered the proper way to use them in a screen-size independant
fashion.

At the moment I am using non-qt root v3.02/07 on win32.  I am also very
interested in using the qt version.  Any guidence here would be greatly
appreciated. Thanks!

Ed Oltman



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET