Re: not-editable canvas

From: Dmitri Litvintsev (litvinse@cdfsga.fnal.gov)
Date: Wed Sep 29 1999 - 00:02:28 MEST


Dear Dariusz,

Look in roottalk digest, item:

http://root.cern.ch/root/roottalk/roottalk99/1293.html

Valery Fine kindly solved this problem for me. 

note that 'picklocker' should be drawn as the very last object
(not the first as suggested)

regards,
Dmitri

On Tue, 28 Sep 1999, Dariusz Miskowiec wrote:

> Dear Rooters,
> 
> I use TCanvas to present information in semi-graphical way, by 
> overimposing counter values on an electronics scheme. It happens 
> that users try to click on the elements of the scheme or to resize 
> them which leads to disaster. I tried to protect my canvas by 
> declaring it to be not-editable but this, apparently, does not change 
> anything. Here is the reduced macro (root 2.20, linux):
> 
>   TCanvas *c1 = new TCanvas("c1", "dupa", 200, 10, 740, 300);
>   c1->SetEditable(kIsNotEditable);      // unfortunately, does not help
>   c1->Range(0,-100,1000,1100);
>   box = new TPaveText(300, 200, 400, 800,"br");
>   box->Draw();
>   c1->Update();
> 
> You can click on the box and drag it and resize and delete and, 
> generally speaking, do all the great things that should not be done   
> in the case of an electronics scheme. 
> 
> How can one protect the canvas, and what is then the meaning of the 
> member function SetEditable()?
> 
> With best regards
> Dariusz Miskowiec
> 
> 
> +-------------------------------------------------------------------+
> +  Dariusz Miskowiec                    E-mail: D.Miskowiec@gsi.de  +
> +  GSI, Planckstr. 1                    Phone:   0049-6159-712-133  +
> +  D-64291 Darmstadt                    KP1 Fax: 0049-6159-712-989  +
> +-------------------------------------------------------------------+
> 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:40 MET