<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Creating custom pop-up windows with the PopUpManager class</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mahesh</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-9560</link>
		<dc:creator>mahesh</dc:creator>
		<pubDate>Fri, 02 Sep 2011 05:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-9560</guid>
		<description>Peter thnq, if u don&#039;t mind...ur profile pic is not looking good...can u keep another pic</description>
		<content:encoded><![CDATA[<p>Peter thnq, if u don&#8217;t mind&#8230;ur profile pic is not looking good&#8230;can u keep another pic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marylka</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-9101</link>
		<dc:creator>Marylka</dc:creator>
		<pubDate>Sun, 03 Apr 2011 16:15:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-9101</guid>
		<description>Popup Flex 4 login with ColdFusion backend !?


Always wanted to have an application where by if someone wanted to view an admin page he/she has to login first.</description>
		<content:encoded><![CDATA[<p>Popup Flex 4 login with ColdFusion backend !?</p>
<p>Always wanted to have an application where by if someone wanted to view an admin page he/she has to login first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deepthika</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-8840</link>
		<dc:creator>deepthika</dc:creator>
		<pubDate>Mon, 17 Jan 2011 05:34:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-8840</guid>
		<description>i want to bring the popup title window at the centre of the screen, but it is not aligned at the centre only for the 1st time. the remaining times , im able to do bring it in the center. when the user clicks the tab for the 1st time, the titlewindow is not appearing in the center, for the second click onwards, it is positioned in the correct place, reply to bhama1000atgmail.com</description>
		<content:encoded><![CDATA[<p>i want to bring the popup title window at the centre of the screen, but it is not aligned at the centre only for the 1st time. the remaining times , im able to do bring it in the center. when the user clicks the tab for the 1st time, the titlewindow is not appearing in the center, for the second click onwards, it is positioned in the correct place, reply to bhama1000atgmail.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-8422</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 08 Oct 2010 15:35:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-8422</guid>
		<description>@Ryan L,

I modified the example slightly (more MXML based and less ActionScripty) and I think this is closer to the behavior you want:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;
    
    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.managers.PopUpManager;
            
            private function createPopUp(evt:MouseEvent):void {
                var panel:MyPanel = PopUpManager.createPopUp(this, MyPanel, true) as MyPanel;
                PopUpManager.centerPopUp(panel);
            }
        ]]&gt;
    &lt;/mx:Script&gt;
    
    &lt;mx:Button label=&quot;Launch Pop-Up&quot; click=&quot;createPopUp(event);&quot; /&gt;
    
&lt;/mx:Application&gt;
&lt;/pre&gt;

And the custom Panel component, &lt;em&gt;MyPanel.mxml&lt;/em&gt;, is as follows:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Panel xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        title=&quot;My Title&quot;
        width=&quot;240&quot; height=&quot;180&quot;
        defaultButton=&quot;{b1}&quot;
        creationComplete=&quot;b2.setFocus();&quot;&gt;
    
    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.managers.PopUpManager;
            
            protected function closePopUp(evt:MouseEvent):void {
                PopUpManager.removePopUp(this);
            }
        ]]&gt;
    &lt;/mx:Script&gt;
    
    &lt;mx:VBox paddingLeft=&quot;5&quot; paddingRight=&quot;5&quot; paddingTop=&quot;5&quot; paddingBottom=&quot;5&quot;&gt;
        &lt;mx:Label id=&quot;lbl&quot; text=&quot;Please enter your name:&quot; /&gt;
        &lt;mx:TextInput id=&quot;textInput&quot; /&gt;
    &lt;/mx:VBox&gt;
    &lt;mx:ControlBar&gt;
        &lt;mx:Spacer width=&quot;100%&quot; /&gt;
        &lt;mx:Button id=&quot;b1&quot; label=&quot;OK&quot; click=&quot;closePopUp(event);&quot; /&gt;
        &lt;mx:Button id=&quot;b2&quot; label=&quot;Cancel&quot; click=&quot;closePopUp(event);&quot; /&gt;
    &lt;/mx:ControlBar&gt;
    
&lt;/mx:Panel&gt;
&lt;/pre&gt;

Now, when the Panel is opened the &quot;Cancel&quot; button is focused, but as soon as the user puts the focus in the TextInput control to enter their name, the Panel container&#039;s default button gets set to the &quot;OK&quot; button so that pressing the enter key while in the TextInput submits the form instead of cancelling.

Peter</description>
		<content:encoded><![CDATA[<p>@Ryan L,</p>
<p>I modified the example slightly (more MXML based and less ActionScripty) and I think this is closer to the behavior you want:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.managers.PopUpManager;</span>
&nbsp;
<span style="color: #339933;">            private function createPopUp(evt:MouseEvent):void {</span>
<span style="color: #339933;">                var panel:MyPanel = PopUpManager.createPopUp(this, MyPanel, true) as MyPanel;</span>
<span style="color: #339933;">                PopUpManager.centerPopUp(panel);</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> label=<span style="color: #ff0000;">&quot;Launch Pop-Up&quot;</span> click=<span style="color: #ff0000;">&quot;createPopUp(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And the custom Panel component, <em>MyPanel.mxml</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Panel</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        title=<span style="color: #ff0000;">&quot;My Title&quot;</span></span>
<span style="color: #000000;">        width=<span style="color: #ff0000;">&quot;240&quot;</span> height=<span style="color: #ff0000;">&quot;180&quot;</span></span>
<span style="color: #000000;">        defaultButton=<span style="color: #ff0000;">&quot;{b1}&quot;</span></span>
<span style="color: #000000;">        creationComplete=<span style="color: #ff0000;">&quot;b2.setFocus();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.managers.PopUpManager;</span>
&nbsp;
<span style="color: #339933;">            protected function closePopUp(evt:MouseEvent):void {</span>
<span style="color: #339933;">                PopUpManager.removePopUp(this);</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> paddingLeft=<span style="color: #ff0000;">&quot;5&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;5&quot;</span> paddingTop=<span style="color: #ff0000;">&quot;5&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;5&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;lbl&quot;</span> text=<span style="color: #ff0000;">&quot;Please enter your name:&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</span> id=<span style="color: #ff0000;">&quot;textInput&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ControlBar</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Spacer</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> id=<span style="color: #ff0000;">&quot;b1&quot;</span> label=<span style="color: #ff0000;">&quot;OK&quot;</span> click=<span style="color: #ff0000;">&quot;closePopUp(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> id=<span style="color: #ff0000;">&quot;b2&quot;</span> label=<span style="color: #ff0000;">&quot;Cancel&quot;</span> click=<span style="color: #ff0000;">&quot;closePopUp(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Panel</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Now, when the Panel is opened the &#8220;Cancel&#8221; button is focused, but as soon as the user puts the focus in the TextInput control to enter their name, the Panel container&#8217;s default button gets set to the &#8220;OK&#8221; button so that pressing the enter key while in the TextInput submits the form instead of cancelling.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan L</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-8420</link>
		<dc:creator>Ryan L</dc:creator>
		<pubDate>Fri, 08 Oct 2010 12:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-8420</guid>
		<description>I have essentially the same thing implemented in my current application.  I need to take it one step further.  I have to set the focus to one of the buttons in my popup (my client wants CANCEL to be focused by default).  Is this possible?  I&#039;m not able to make button.setFocus() work.  Anything funky about PopUpManager that I&#039;m missing?</description>
		<content:encoded><![CDATA[<p>I have essentially the same thing implemented in my current application.  I need to take it one step further.  I have to set the focus to one of the buttons in my popup (my client wants CANCEL to be focused by default).  Is this possible?  I&#8217;m not able to make button.setFocus() work.  Anything funky about PopUpManager that I&#8217;m missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raksmey</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-8351</link>
		<dc:creator>raksmey</dc:creator>
		<pubDate>Wed, 22 Sep 2010 07:35:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-8351</guid>
		<description>thank it useful for me and it help me now good job</description>
		<content:encoded><![CDATA[<p>thank it useful for me and it help me now good job</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andres</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-7029</link>
		<dc:creator>andres</dc:creator>
		<pubDate>Tue, 16 Feb 2010 13:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7029</guid>
		<description>nice  example. i wonder  how can i create a sub modal. i mean. i need a modal who just covers a required container ( and its childs), not the whole application .  thanks in advance.</description>
		<content:encoded><![CDATA[<p>nice  example. i wonder  how can i create a sub modal. i mean. i need a modal who just covers a required container ( and its childs), not the whole application .  thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-6452</link>
		<dc:creator>James</dc:creator>
		<pubDate>Wed, 25 Nov 2009 05:07:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-6452</guid>
		<description>Hello Peter,

I am a student at the University of Nevada Reno and I like this application.  I am gonna try to manipulate it but I am very new to Flex.  I want to be able to click on text and the pop up contain images and info.  Any help would be greatly appreciated.  For example, we are creating a web site about entertainment and when the user clicks on an event the pop up window will appear and the user will be able to see more detailed information about the specific event.</description>
		<content:encoded><![CDATA[<p>Hello Peter,</p>
<p>I am a student at the University of Nevada Reno and I like this application.  I am gonna try to manipulate it but I am very new to Flex.  I want to be able to click on text and the pop up contain images and info.  Any help would be greatly appreciated.  For example, we are creating a web site about entertainment and when the user clicks on an event the pop up window will appear and the user will be able to see more detailed information about the specific event.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chua Chee Seng</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-6034</link>
		<dc:creator>Chua Chee Seng</dc:creator>
		<pubDate>Fri, 16 Oct 2009 16:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-6034</guid>
		<description>hi friend,

Your example hit error if you:-
i) Click the button to open the popup
ii) While the popup is still open, press &#039;space&#039; 2 times on your keyboard

To avoid that, you should add the setFocus()  after PopupManager.centerPopup:-

 PopUpManager.addPopUp(panel, this, true);
 PopUpManager.centerPopUp(panel);
panel.setFocus();</description>
		<content:encoded><![CDATA[<p>hi friend,</p>
<p>Your example hit error if you:-<br />
i) Click the button to open the popup<br />
ii) While the popup is still open, press &#8216;space&#8217; 2 times on your keyboard</p>
<p>To avoid that, you should add the setFocus()  after PopupManager.centerPopup:-</p>
<p> PopUpManager.addPopUp(panel, this, true);<br />
 PopUpManager.centerPopUp(panel);<br />
panel.setFocus();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lulu</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/comment-page-1/#comment-5950</link>
		<dc:creator>Lulu</dc:creator>
		<pubDate>Wed, 07 Oct 2009 13:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-5950</guid>
		<description>I found out that it was just the text color.

Mabye it will help someone new (like me ;o)

Lulu</description>
		<content:encoded><![CDATA[<p>I found out that it was just the text color.</p>
<p>Mabye it will help someone new (like me ;o)</p>
<p>Lulu</p>
]]></content:encoded>
	</item>
</channel>
</rss>

