2 Replies Latest reply on Oct 22, 2007 2:58 AM by SkrellK

    Trigger menuEvent manually

    SkrellK
      I have a mx:MenuBar with several menu options. I also have a toolbar with icons. My problem is that when i click a toolbar icon i want to check one of the menu items in the menu. How can I trigger such an event?
        • 1. Re: Trigger menuEvent manually
          MikeBurns76
          well you could listen for the Click event on the menubar and then when you get it, simply call the same function that is called when you click the menu item. This means that the menu item Click handler will have to also call this function, i.e. you cant have the code in the event handler.

          I hope that helps.
          • 2. Re: Trigger menuEvent manually
            SkrellK Level 1
            Thanks for the reply, but that would not work because the handler needs to know which menu item was clicked. But I found out how to dispatch the exact same event using the menubar's event dispatcher. It all worked fine :)