This is my example. I am not creating one as it is already available, just
trying to add it and center it.
_renamedir = new RenameDirectory
//add modal window
PopUpManager.addPopUp(_renamedir,this,true);
//center modal window
PopUpManager.centerPopUp(_renamedir);
Thank You
Dan Vega
[email protected]
http://www.danvega.org
On Sat, Dec 27, 2008 at 4:12 PM, Manish Jethani <[email protected]>wrote:
> On Sun, Dec 28, 2008 at 2:19 AM, Dan Vega
> <[email protected]<danvega%40gmail.com>>
> wrote:
> > I forgot to mention, I am inside of a custom renderer. I tried both
> > suggestions and they did not work.
>
> Here's a small example:
>
> <?xml version="1.0"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> xmlns="*">
> <mx:Script>
> <![CDATA[
> import mx.managers.PopUpManager;
> import mx.containers.Panel;
>
> private function testIt():void
> {
> var p:* =
> PopUpManager.createPopUp(DisplayObject(Application.application),
> Panel);
>
> p.width = 200;
> p.height = 200;
> p.title = "Pop-Up Window";
>
> PopUpManager.centerPopUp(p);
> }
> ]]>
> </mx:Script>
> <mx:Button click="testIt()" label="Test" />
> </mx:Application>
>
> You could run the testIt method from anywhere (even from within an
> item renderer), and the result would be the same. I'd have to see your
> code to really figure out why this isn't working for you.
>
> --
> Visit me at manishjethani.com
>
>