Search code examples
apache-flexactionscriptuicomponents

Setting the Panel Owner


I've got an application that allows a panel to popup to allow the user to edit some properties.

How do I set the panel owner so that it is on top of all the other components on the page without actually disabling them like you do with an alert box?


Solution

  • Use the PopUpManager to display something on top of everything else. I used a function like this to create the Popup before:

    protected function createPopUp(className:Class):void{
      var win : IFlexDisplayObject = PopUpManager.createPopUp(Application.application as DisplayObject, className, false) as IFlexDisplayObject;
      PopUpManager.centerPopUp(win);
    }
    

    You can see it in action with the Flextras Calendar API Explorer. Click any button on the top bar.