This post´s a little long ago, but I thought I´d post an answer
anyway:
one can achieve the desired behaviour easily by creating a custom
component that extends PopUpMenuButton.

In your custom component just override the clickHandler-method like
this:

override protected function clickHandler(event:MouseEvent):void
{
   //super.clickHandler(event);  --> do NOT envoke PopUpMenuButton´s
.clickHandler()
}

In mxml U can then define your own handler only for the button controls
(eg. open the menu only, dont call itemClick-Handler automatically):
<controls:myPopUpMenuButton
    click     = "{ event.target.open() }"
    itemClick = "{ myItemClickHandler(event) }" />

hth
carsten

--- In flexcoders@yahoogroups.com, "paromitadey" <[EMAIL PROTECTED]>
wrote:
>
> Hello Everybody,
>
> I am working with a PopupMnuButton. The PopupMenuButton is skined so
> the selected value is not visible. The menu has four items which
> when clicked performs respective operations. But when the main
> button of the PopupMenuButton is clicked it performs the operation
> for the first menu item. I wish to stop that from happening.
>
> Going through the help files I found that PopupMenuButton dispatches
> a click event when the main button part of the PopupMenuButton is
> clicked, which further dispatches the itemClick event for the last
> selected index.
> Is there a way around to stop the click event from firing when the
> main button is clicked?
>
> I dont want any action to take place if the button is clicked. The
> user has to select an item from the menu.
>
> Please advise.
>
> Regards,
> Paromita
>

Reply via email to