Re: [ROOT] TBrowser geometry

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Nov 18 2003 - 00:21:57 MET


Hi Valeriy,

  it works under gdk because there is no WM but the X11 behavior is as
expected (WM takes it only as a hint and does not have to honor it
depending on the window placement setting in the window manager). Always
use Move() to move an already visible window.

Cheers, Fons.



On Mon, 2003-11-17 at 12:43, Valeriy Onuchin wrote:
> Hi,
> I checked this macro under win32gdk where
> "b->SetWMPosition(300, 300);" works OK ...
> BUT this method really doesn't  work under linux/KDE.
> It will be fixed ASAP.
> 
> Use b->Move(300, 300) instead.
> 
> Regards. Valeriy
> 
> 
> > Hello Valeriy,
> >
> > actually it does not change anything...
> > I tested it just like
> >
> > a)
> > root -l
> > .x tst.C
> >
> >
> > b)
> > root -l
> > .L tst.C
> >
> > In both cases it gave me the window not at (300,300)
> > but either at (0,0) or at (750,0) depending on other
> > windows on the screen (I use KDE, so some alignment
> > is there due to KDE alignment)
> >
> > Regards,
> > Alexander
> >
> > --
> > \--------------------------------------------------------------------//
> > | Alexander Sadovsky,       FZ Rossendorf,   Ph.D. student TU Dresden |
> > | Tel: +49-351-2602073  www.fz-rossendorf.de/FWK/MITARB/sadovski/mdc/ |
> > //--------------------------------------------------------------------\
> >                                                                      --
> >
> > On Mon, 17 Nov 2003, Valeriy Onuchin wrote:
> >
> > >  Hi Alexander,
> > > the best way to add funcionality to some class
> > > "without recompiling the code, or writing user defined classes"
> > > is using "class signal-slot connection".
> > > For mor info goto  http://root.cern.ch/root/HowtoSignalSlot.html
> > >
> > > Execute the following macro during your rootlogin.C and
> > > every browser will be placed at  x=300, y=300 position.
> > >
> > > Regards. Valeriy
> > >
> > > ////////////////////////////////////// tst.C
> > > ////////////////////////////////////////////////////////////////////////
> > > #include "TRootBrowser.h"
> > >
> > > void setBrowserXY(Event_t* event)
> > > {
> > >    if (event->fType != kMapNotify) return;
> > >    TRootBrowser *b = (TRootBrowser*)gTQSender;
> > >    b->SetWMPosition(300, 300);
> > > }
> > >
> > > void tst()
> > > {
> > >
> > >
> TQObject::Connect("TRootBrowser","ProcessedEvent(Event_t*)",0,0,"setBrowserX
> > > Y(Event_t*)");
> > > }
> > >
> > >
> > >
> > > > Hello, root users and developers!
> > > >
> > > > Is that possible to customize the TBrowser geometry
> > > > (like it is done for "xterm" in Linux) via .rootrc or rootlogin.C
> > > >
> > > > The problem is that it is inconvinient to have this window randomly
> > > > appearing on my screen.
> > > >
> > > > The same question holds for the TCanvas opend by click from TBrowser.
> > > > Is it possinle to specify the position of this window too, without
> > > > recompiling the code, or writing user defined classes?
> > > >
> > > > I would not ask, but this was possible in PAW, I guess in ROOT
> > > > it is also made, just I can not find it...
> > > >
> > > > Thanks a lot,
> > > > Alexander
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://www.rademakers.org/fons/      Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET