Re: [ROOT] pads & canvases VS Frames & CompositeFrames

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue May 15 2001 - 16:26:15 MEST


Hi Simon,

  have a look at $ROOTSYS/test/guiviewer.cxx and $ROOTSYS/test/guitest.cxx
and look for the use of TRootEmbeddedCanvas.

Cheers, Fons.


simon wrote:
> 
> hi again ROOTERS,
> 
> Does anyone know how to have TCanvas and TPad as well as TFrame and
> TCompositeFrame in the same application without encountering obvious
> segmentation faults ??
> 
> for example, my program is already defined around a main canvas and its pads,
> but i really need a TFrame in one of the pads so i can use all the TGBUTTONS and
> TGComboBox type of widgets which do not exist for TPads. I tried the following
> (and many others)
> 
> //
> canv= new TCanvas("GUI","GUI",canvw,canvh);
> 
> canv->Divide(1,4);
> canv->cd(2);
> 
> frame= new TFrame((TGWindow*)gPad), framew,frameh);
> //
> 
> I cast the current pad into a TGWindow and create a frame
> it does compiles but automatically gives a segmentation fault when i try to run
> the App...
> 
> Any suggestions??
> 
> thanks
> 
> Simon

-- 
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 01 2002 - 17:50:45 MET