The Menu will dispatch a plain "click" event for the parent nodes. Since menu options also dispatch "click", you need to check for tht in the handler.
Tracy Spratt, Lariat Services, development services available _____ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Monday, April 06, 2009 6:07 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] select non-top level items in a hierarchical menu So it looks like I can fake this by tracking a stack of open menus and dynamically adding / removing MOUSE_DOWN listeners to the last menu opened / closed. This seems... ahem... less than ideal. Anyone have a better suggestion? -Maciek -----Original Message----- From: Maciek Sakrejda <msakre...@truviso. <mailto:msakrejda%40truviso.com> com> Reply-to: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com To: flexcoders <flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com> Subject: [flexcoders] select non-top level items in a hierarchical menu Date: Mon, 06 Apr 2009 13:07:37 -0700 I need the ability to select non-leaf items in a hierarchical menu--is this doable? Basically, suppose I have a dataProvider like this: [ { label: 'a' }, { label: 'b', children: [ { label: '1' }, { label: '2' } ] } ] I want to be able to select a, b, 1, or 2. I can do exactly what I want with a Tree, but I was hoping for something more compact. It seems that selecting a node that has children does not dispatch an ITEM_CLICK event: it just automatically opens the submenu. I'd like to open/close the submenu on rollOver/rollOut, and dispatch a normal ITEM_CLICK for that item on a click. -Maciek