[ROOT] Got those SetEditable() blues again....

From: Brett Viren (bv@bnl.gov)
Date: Tue Jan 29 2002 - 21:51:17 MET


This gives me deja vu all over again, but I can't find this in the
email archives.


What exactly does the TPad:fEditable flag mean?  

The comments in the code (TPad::SetEditable) say, when true, it keeps
the user from interactively (via the mouse) moving things around in
the TPad.  This it does, however, it also stops non-interactive
things, such as TObject::AppendPad().

What other methods does it block?

My use case is I want to build a TCanvas full of several TPads.  I
don't want the users to be able to interactively move the TPads around
in the TCanvas, but I want to still be able to add objects into the
TPads (from code, not via the mouse).  These objects should also not
be interactively movable.

How can I do this?

Do I have to wrap all calls which touch the TPad with
SetEditable(true)/SetEditable(false).  If so, which ones?  It isn't
always obvious.  This would be very painful, particularly since
methods silently fail when blocked.

The alternative seems to be letting the TCanvas and child TPads be
fully editable, which is fine until that one mistaken click-drag
event rearranges the display.

Any guidance is appreciated,
-Brett.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:40 MET