Hi Christian,
I've added the methods: SetAutoFit() and GetAutoFit(). Try using it
like:
TRootEmbeddedCanvas *embedded = new TRootEmbeddedCanvas(0, p, 100, 100);
[note name must be 0, not null string ""]
Int_t wid = embedded->GetCanvasWindowId();
TCanvas *myc = new TCanvas("myname", 600, 600, wid);
embedded->SetAutoFit(kFALSE);
embedded->AdoptCanvas(myc);
Let me know if this works for you.
Cheers, Fons.
On Sun, 2003-04-27 at 19:06, cstrato wrote:
> Dear Rooters
>
> In my GUI-application I want to create a canvas of fixed size in a
> TGCanvas with scrollbars.
>
> Sorrowly, I am unable to use TRootEmbeddedCanvas for this purpose,
> since for some reason it is not possible to set: fAutoFit = kFALSE;
>
> For some reason it is also not possible to embed TRootEmbeddedCanvas
> in TGCanvas, I get no scrollbars.
> Only embedding TRootEmbeddedCanvas in TGCompositeFrame,
> which is embedded in TGCanvas did help (pretty complicated).
>
> Since I want to set a checkbox, determining, if the canvas should
> have fixed size or keep the size of its container, it would be great,
> if a function SetAutoFit(kFALSE) could be added.
>
> Thank you in advance.
>
> Best regards
> Christian
> _._._._._._._._._._._._._._._._
> C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a
> V.i.e.n.n.a A.u.s.t.r.i.a
> _._._._._._._._._._._._._._._._
--
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 7679480
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET