Friday, May 14, 2010

Flex PopUpMenuButton

I was tasked the other day at work to modify the Flex PopUpMenuButton to behave like a single button. The PopUpMenuButton default basically acts like two buttons. The left button executes the first menu item, and the "Arrow" button drops down the menu. The users did not like this default functionality and only wanted one button to drop down the menu. Instead of trying to re-create the PopUpMenuButton with a single button, I instead extended the PopUpMenuButton. With a simple mx_internal override of one function, I was able to get the menu to drop down no matter where you click on the button.

Here's the example. (right click to view source):

Hopefully, this will save someone some time.


  1. Thanks a lot! I was just wondering how to do that.

  2. Perfect Job Done.............. Thank you

  3. AWESOME !!!!

    Thank you very much. It is really useful. It would be very nice that you tell us the story of how you did this.
    Thanks. Best wishes and regards.

    Albert Cullen