Re: TGListTree

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Mar 16 1999 - 19:10:55 MET


Hi Anton,

   search in http://root.cern.ch/root/html/src/TRootBrowser.cxx.html
for kC_LISTTREE to see how 'which button' and 'location' are used.

It is not easily possible to handle multiple TGListTree's in the same
ProcessMessage method (since there is no ID like with buttons).
What you could do is to use the 'location' to see in which TGListTree
you are (by using the TGListTree's TGFrame::GetX(), GetY(), Width()
and Height() and compare them to the event's location).
Otherwise you can handle the other TGListTree's in the ProcessMessage
of an additional TGCompositeFrame in which you embed the tree
(using the Associate() method).


Cheers, Fons.




Anton Fokin wrote:
> 
> Hi there,
> 
> could someone explain me what is the meaning of the following:
> 
> ----
> A list tree can generate the following events:
>  kC_LISTTREE, kCT_ITEMCLICK, which button, location (y<<16|x).
>  kC_LISTTREE, kCT_ITEMDBLCLICK, which button, location (y<<16|x).
> ----
> 
> what are "which button" and "location". I would also like to know how to
> handle events from TWO different TGListTrees belonging to one dialog
> window, i.e. how to distinguish between them.
> 
> Yours,
> 
> Dr. Anton Fokin
> 
> Division of Cosmic and Subatomic Physics
> Lund University
> Sweden

-- 
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 04 2000 - 00:43:30 MET