5/24/2010 12:42:56 AM
Title:
popup window position
Hi All,
I have a popup window, by default i given a center pop up in my appliation, but i want top right of the application. How to give? please help me..
Thanks in advance,
K.V.Ramakrishna
5/24/2010 1:54:02 AM
Using flex with Actionscript 3.0
To position you popup window you can add it to some container and place that container at any position.
//here myTitleWindow is my TitleWindow that I am adding as popup and popContainer is my Vbox which is placed at x=0. So my popup window is also placed at x.
mx.managers.PopUpManager.addPopUp(myTitleWindow, popContainer, true);
If you didn't understand , let me know I will send you the sample
5/24/2010 2:47:17 AM
you can position the popUpWIndow to center using PopUpManager.createPopUp(yourPopUp);
5/24/2010 4:02:28 AM
Hi,
Please send the sample
5/24/2010 5:36:37 AM
check this sample to position popup anywhere in application using flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="700" height="400">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;
private function createPopup():void{
var tw:TitleWindow = new TitleWindow();
tw.title = "My Title";
mx.managers.PopUpManager.addPopUp(pnl, popContainer, true);
}
private function removePopup():void{
PopUpManager.removePopUp(pnl);
}
]]>
</mx:Script>
<mx:Button x="32" y="37" label="Create Popup" click="createPopup()"/>
<mx:Button x="143" y="37" label="Remove Popup" click="removePopup()"/>
<mx:VBox x="0" y="50" id="popContainer">
</mx:VBox>
<mx:TitleWindow x="143" y="98" id="pnl" backgroundColor="#FF5B5B" dropShadowEnabled="true" shadowDirection="right" shadowDistance="10" backgroundAlpha="1" borderStyle="solid">
<mx:FormItem label=" My pop Up Content">
<mx:Button label="Button"/>
</mx:FormItem>
</mx:TitleWindow>
</mx:Application>