Re: [ROOT] EventStatus

From: George Irwin (gmieg@egnext1.slac.stanford.edu)
Date: Wed Jun 07 2000 - 01:54:44 MEST


> Hi Faouzi,
> the StatusBar is part of the TRootCanvas object (which contains the
> menubar canvas and status bar) and is not available in the
> embeddedcanvas (which only contains the canvas). You can add a
> status bar to the widget containing the embedded canvas.  How
> to create a statusbar see the code for TRootCanvas.
> Cheers, Fons.

Hi Fons,  In October I sent a related question to roottalk, which
never got an answer.  Is there a nice way to forward the event status
information to the status bar owned by the frame containing the
canvas?  Thanks.  George

"I want to use TRootEmbeddedCanvas with a TGStatusBar.  However,
TRootEmbeddedCanvas instantiates its TCanvas *fCanvas with a
constructor which disallows a TGStatusBar.  So I create my
TRootEmbeddedCanvas from another TGCompositeFrame (fParent of
TRootEmbeddedCanvas) which owns a TGStatusBar and has a menu item
which toggles an fShowEventStatus switch.  Then I have to modify the
methods like:

TRootEmbeddedCanvas::HandleContainerButton(Event_t event)

to forward event status information to fParent's TGStatusBar using:

((ParentType*)fParent)->SetStatusText(fCanvas->GetSelected()->GetObjec 
tInfo(px,py),ipart);

I'd prefer not to have to modify TRootEmbeddedCanvas.  Adding the
ParentType dependency to the modified TRootEmbeddedCanvas class seems
particularly ugly.  Is there a better way to do this?  For example,
the TRootEmbeddedContainer class might be a logical place to provide
status bar and perhaps menu functionality."

> 

> Faouzi Attallah wrote:
> > 

> > Hi Rene,
> > 

> > Is it possible, or is there a way to get working
> > ToggleEventStatus() within a TRootEmbeddedCanvas.
> > 

> > Thanks a lot.
> > Faouzi.



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET