Re: [ROOT] Keyboard focus for TGLVContainer

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Jul 03 2001 - 13:07:53 MEST


Hi Olivier,


On Tue, Jul 03, 2001 at 10:40:41AM +0100, Olivier Barret wrote:
> 
> How can I get the keyboard focus for a TGFileContainer object?
> Simply adding a HandleKey member function to the TGLVContainer class
> doesn't work so I guess I have to somehow get the focus of the keyboard.
> What I'm trying to do is basically allow multiple selection when a key(say
> shift or CTRL) is held down. I don't find the multiple selection by
> dragging a rectangle always very convenient.
>
Keyboard focus for this widget is not implemented (yet). 
> 
> Also, it is not very clear to me what we are supposed to delete ourself
> and what is deleted automatically as there are cases where an object is
> adopted by another object and deleted by the latter.
> For instance are the frames inside a composite frame adopted by that frame
> and deleted by it or do we have to do it?
> Same for TGLayoutHints.
> My understanding is that we should delete everything in reverse
> order(children before parent) but there are instances in guitest.cxx where
> unamed TGLayoutHints objects are created and therefore not deleted by the
> user. So are they adopted by the frames?
> Is there a general rule that could help figure it out?
>
Unfortunately guitest.cxx is not (yet) a good example to see what exactly
has to be deleted by the user. A better example is TRootBrowser.cxx where
all objects are deleted as it should be. Anyway, in general only a few methods
adopt the objects passed as arguments (typically TGString objects). In that
case it is clearly stated in the description of that method that the passed
object is adopted. Widgets and layouthints are never adopted and must be
explicitely deleted by the creator.

Cheers, Fons.




> 
> Thanks for your help.
> Olivier
> 

-- 
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:51 MET