Hi Brett, sound like a good idea. Could probably be implemented in such a way that it is backward compatible (with a method like RecusiveAssociate()). Would you mind to implement this and mail me this patch? Cheers, Fons. On Fri, 2002-02-08 at 18:53, Brett Viren wrote: > Hi, > > The need to use TGPopupMenu::Associate() makes it very difficult to > construct any hierarchical menus since you have to know the top level > widget (usually a TGMenuBar) in the context of each submenu creation. > > It also makes it impossible to create a (working) menu hierarchy with > out knowing where it will be used (ie, what TGMenuBar will eventually > hold it). > > I think the simplest solution is to have TGPopupMenu::Associate() > recursively descend and call Associate() on all of its menu entries > which are also TGPopupMenus. This way a menu hierarchy could be built > up, independent of where it will be used (data encapsulation!), and > then the object which creates the top level menu can call Associate() > with the parent object, and have this trickle down the hierarchy. > > Alternatively, but probably a lot more work, is to pass the parent > menu to a submenu's Associate() and then have TGPopupMenus know how to > forward events up to the top level widget. > > Comments? > > -Brett. > > > -- 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 : Sat Jan 04 2003 - 23:50:41 MET