views:

177

answers:

1

I have a popup button that launches a canvas containing a form that a user can submit. I'm validating this form and displaying an alert when the validation fails. As soon as the user clicks 'OK' on the alert, the canvas launched from the PopUpButton loses focus and closes automatically (its default behavior). PopUpButton._closeOnActivity is private. Any suggestions are greatly appreciated.

+2  A: 

Use PopUpManager and a normal button to pop something up manually instead of using a PopUpButton. You can then open and close it when you want to and avoid the default behavior.

var canvas:Canvas = new Canvas();
PopUpManager.addPopUp(canvas, this);
PopUpManager.centerPopUp(canvas);
PopUpManager.removePopUp(canvas);
Sean Clark Hess