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 <[email protected]> Reply-to: [email protected] To: flexcoders <[email protected]> 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

