<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; displayAsPassword</title>
	<atom:link href="http://blog.flexexamples.com/tag/displayaspassword/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Displaying a Spark TextInput control&#8217;s text as a password in Flex Gumbo</title>
		<link>http://blog.flexexamples.com/2009/01/18/displaying-a-fxtextinput-controls-text-as-a-password-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/01/18/displaying-a-fxtextinput-controls-text-as-a-password-in-flex-gumbo/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 06:48:02 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[TextInput (Spark)]]></category>
		<category><![CDATA[displayAsPassword]]></category>
		<category><![CDATA[Gumbo]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/01/18/displaying-a-fxtextinput-controls-text-as-a-password-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows you how you can toggle between plain text and text masked as a password by setting the displayAsPassword property on a Flex Gumbo Spark TextInput control.</p> <p>Full code after the jump.</p> <p></p> <p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you can toggle between plain text and text masked as a password by setting the <code>displayAsPassword</code> property on a Flex Gumbo Spark TextInput control.</p>
<p>Full code after the jump.</p>
<p><span id="more-938"></span></p>
<p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For more information on downloading and installing the Gumbo SDK into Flex Builder 3, see <a href="http://blog.flexexamples.com/2008/08/02/using-the-beta-gumbo-sdk-in-flex-builder-3/">&#8220;Using the beta Gumbo SDK in Flex Builder 3&#8243;</a>.</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/01/18/displaying-a-fxtextinput-controls-text-as-a-password-in-flex-gumbo/ --&gt;
&lt;s:Application name="Spark_TextInput_displayAsPassword_test"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo"&gt;

    &lt;mx:ApplicationControlBar width="100%" cornerRadius="0"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="displayAsPassword:"&gt;
                &lt;s:CheckBox id="checkBox" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;s:TextInput id="textInput"
            text="The quick brown fox jumps over the lazy dog."
            displayAsPassword="{checkBox.selected}"
            horizontalCenter="0"
            verticalCenter="0" /&gt;

&lt;/s:Application&gt;
</pre>
<p>You can also set the <code>displayAsPassword</code> property using ActionScript, as seen in the following example:</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/01/18/displaying-a-fxtextinput-controls-text-as-a-password-in-flex-gumbo/ --&gt;
&lt;s:Application name="Spark_TextInput_displayAsPassword_test"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo"&gt;

    &lt;fx:Script&gt;
        &lt;![CDATA[
            private function checkBox_change(evt:Event):void {
                textInput.displayAsPassword = checkBox.selected;
            }
        ]]&gt;
    &lt;/fx:Script&gt;

    &lt;mx:ApplicationControlBar width="100%" cornerRadius="0"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="displayAsPassword:"&gt;
                &lt;s:CheckBox id="checkBox"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;s:TextInput id="textInput"
            text="The quick brown fox jumps over the lazy dog."
            horizontalCenter="0"
            verticalCenter="0" /&gt;

&lt;/s:Application&gt;
</pre>
<p class="alert">This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying a Spark TextInput control\&#039;s text as a password in Flex Gumbo on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/01/18/displaying-a-fxtextinput-controls-text-as-a-password-in-flex-gumbo/',contentID: 'post-938',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'displayAsPassword,Gumbo',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/01/18/displaying-a-fxtextinput-controls-text-as-a-password-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a tool tip on a Flex TextInput control with password masked text</title>
		<link>http://blog.flexexamples.com/2008/01/28/creating-a-tool-tip-on-a-flex-textinput-control-with-password-masked-text/</link>
		<comments>http://blog.flexexamples.com/2008/01/28/creating-a-tool-tip-on-a-flex-textinput-control-with-password-masked-text/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 14:38:23 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TextInput]]></category>
		<category><![CDATA[ToolTip]]></category>
		<category><![CDATA[displayAsPassword]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/28/creating-a-tool-tip-on-a-flex-textinput-control-with-password-masked-text/</guid>
		<description><![CDATA[<p>The following example shows you how you can use a tool tip on a Flex TextInput control with its displayAsPassword property set to true. By mousing over the credit card number field in the form below, you can see your credit card number in a readable tool tip.</p> <p>Want the short version? Use a simple [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you can use a tool tip on a Flex TextInput control with its <code>displayAsPassword</code> property set to <code>true</code>. By mousing over the credit card number field in the form below, you can see your credit card number in a readable tool tip.</p>
<p>Want the short version? Use a simple binding to bind the tool tip text to the TextInput control&#8217;s text, as seen in the following snippet:</p>
<pre class="code">
&lt;mx:TextInput id=&quot;ccNumber&quot;
        text=&quot;4111111111111111&quot;
        displayAsPassword=&quot;true&quot;
        <strong style="color:red;">toolTip=&quot;{ccNumber.text}&quot;</strong> /&gt;
</pre>
<p>Looking for a longer version? Read on!</p>
<p>Full code after the jump.</p>
<p><span id="more-486"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_toolTip_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/28/creating-a-tool-tip-on-a-flex-textinput-control-with-password-masked-text/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.formatters.DateBase;
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="Name:"&gt;
            &lt;mx:TextInput id="ccName"
                    text="JOHN DOE" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="Number:"&gt;
            &lt;mx:TextInput id="ccNumber"
                    text="4111111111111111"
                    displayAsPassword="true"
                    toolTip="{ccNumber.text}" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="Type:"&gt;
            &lt;mx:ComboBox id="ccType"
                    dataProvider="[American Express,MasterCard,Visa]" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="Expiration:" direction="horizontal"&gt;
            &lt;mx:ComboBox id="ccExpMM"
                    initialize="ccExpMM.dataProvider = DateBase.monthNamesShort;" /&gt;
            &lt;mx:ComboBox id="ccExpYYYY"
                    dataProvider="[2008,2009,2010]" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_toolTip_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TextInput_toolTip_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a tool tip on a Flex TextInput control with password masked text on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/01/28/creating-a-tool-tip-on-a-flex-textinput-control-with-password-masked-text/',contentID: 'post-486',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'displayAsPassword',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/01/28/creating-a-tool-tip-on-a-flex-textinput-control-with-password-masked-text/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Displaying a Label control&#8217;s text as a password</title>
		<link>http://blog.flexexamples.com/2008/01/27/displaying-a-label-controls-text-as-a-password/</link>
		<comments>http://blog.flexexamples.com/2008/01/27/displaying-a-label-controls-text-as-a-password/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 17:09:39 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Label]]></category>
		<category><![CDATA[displayAsPassword]]></category>
		<category><![CDATA[textField]]></category>
		<category><![CDATA[truncateToFit]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/27/displaying-a-label-controls-text-as-a-password/</guid>
		<description><![CDATA[<p>The following example shows you how you create a custom Label control in Flex that masks its text as a password by setting the Label control&#8217;s nested protected UITextField control&#8217;s displayAsPassword property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Label_textField_displayAsPassword_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/01/27/displaying-a-label-controls-text-as-a-password/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:HBox&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you create a custom Label control in Flex that masks its text as a password by setting the Label control&#8217;s nested protected UITextField control&#8217;s <code>displayAsPassword</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-485"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Label_textField_displayAsPassword_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/27/displaying-a-label-controls-text-as-a-password/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:local="*"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:HBox&gt;
        &lt;mx:Label text="Password:" /&gt;
        &lt;local:MyLabel id="lbl"
                text="The quick brown fox jumped over the lazy dog."
                truncateToFit="true"
                width="100"
                creationComplete="lbl.tf.displayAsPassword = true;" /&gt;
    &lt;/mx:HBox&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Label_textField_displayAsPassword_test/MyLabel.mxml">View MyLabel.mxml</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/27/displaying-a-label-controls-text-as-a-password/ --&gt;
&lt;mx:Label xmlns:mx="http://www.adobe.com/2006/mxml"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.core.IUITextField;

            public function get tf():IUITextField {
                return textField;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Label&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Label_textField_displayAsPassword_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Label_textField_displayAsPassword_test/bin/main.html" width="100%" height="100"></iframe></p>
<p>As you can see, the Label control&#8217;s text is masked, but rolling over the label displays the masked text, because the <code>truncateToFit</code> property is set to <code>true</code>.</p>
<p class="note">Note that the truncated Label text does not display the traditional ellipsis (&#8220;&#8230;&#8221;) indicating that the text has been truncated. That is because the ellipsis is also displayed as password text (masked as &#8220;*&#8221;).</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying a Label control\&#039;s text as a password on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/01/27/displaying-a-label-controls-text-as-a-password/',contentID: 'post-485',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'displayAsPassword,textField,truncateToFit',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/01/27/displaying-a-label-controls-text-as-a-password/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Displaying a TextInput control&#8217;s text as a password in Flex (redux)</title>
		<link>http://blog.flexexamples.com/2008/01/27/displaying-a-textinput-controls-text-as-a-password-in-flex-redux/</link>
		<comments>http://blog.flexexamples.com/2008/01/27/displaying-a-textinput-controls-text-as-a-password-in-flex-redux/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 16:42:45 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[PopUpManager]]></category>
		<category><![CDATA[TextInput]]></category>
		<category><![CDATA[displayAsPassword]]></category>
		<category><![CDATA[focusIn]]></category>
		<category><![CDATA[focusOut]]></category>
		<category><![CDATA[removePopUp()]]></category>
		<category><![CDATA[setTimeout()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/27/displaying-a-textinput-controls-text-as-a-password-in-flex-redux/</guid>
		<description><![CDATA[<p>We&#8217;ve already seen how to get a TextInput control to display its text as a masked password field before in an earlier example, <a href="http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/">&#8220;Displaying a TextInput control&#8217;s text as a password in Flex&#8221;</a> by setting the displayAsPassword property to true.<br /> The following example will show you how you can listen for the focusIn [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve already seen how to get a TextInput control to display its text as a masked password field before in an earlier example, <a href="http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/">&#8220;Displaying a TextInput control&#8217;s text as a password in Flex&#8221;</a> by setting the <code>displayAsPassword</code> property to <code>true</code>.<br />
The following example will show you how you can listen for the <code>focusIn</code> and <code>focusOut</code> events to toggle the <code>displayAsPassword</code> property so that when the password field has focus the text is displayed as plain text, and when the password field does not have focus the text is displayed as masked text.</p>
<p>Full code after the jump.</p>
<p><span id="more-484"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_displayAsText_test_2/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/27/displaying-a-textinput-controls-text-as-a-password-in-flex-redux/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Alert;
            import mx.managers.PopUpManager;

            private var alert:Alert;

            private function submit_click():void {
                alert = Alert.show("Closing in 3 seconds.",
                                    "Submitting...");
                setTimeout(closeAlert, 3000);
            }

            private function reset_click():void {
                alert = Alert.show("Closing in 1 second.",
                                    "Resetting...");
                username.text = "";
                password.text = "";
                setTimeout(closeAlert, 1000);
            }

            private function closeAlert():void {
                PopUpManager.removePopUp(alert);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Panel title="Login"&gt;
        &lt;mx:Form&gt;
            &lt;mx:FormItem label="Username:" required="true"&gt;
                &lt;mx:TextInput id="username"
                        text="JohnDoe"
                        maxChars="16" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="Password:" required="true"&gt;
                &lt;mx:TextInput id="password"
                        text="p455w0rd"
                        maxChars="16"
                        displayAsPassword="true"
                        focusIn="password.displayAsPassword = false;"
                        focusOut="password.displayAsPassword = true;" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
        &lt;mx:ControlBar horizontalAlign="right"&gt;
            &lt;mx:Button id="submit"
                    label="Submit"
                    click="submit_click();" /&gt;
            &lt;mx:Button id="reset"
                    label="Reset"
                    click="reset_click();" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_displayAsText_test_2/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TextInput_displayAsText_test_2/bin/main.html" width="100%" height="220"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying a TextInput control\&#039;s text as a password in Flex (redux) on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/01/27/displaying-a-textinput-controls-text-as-a-password-in-flex-redux/',contentID: 'post-484',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'displayAsPassword,focusIn,focusOut,removePopUp(),setTimeout()',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/01/27/displaying-a-textinput-controls-text-as-a-password-in-flex-redux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Displaying a TextInput control&#8217;s text as a password in Flex</title>
		<link>http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 07:07:19 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TextInput]]></category>
		<category><![CDATA[displayAsPassword]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/</guid>
		<description><![CDATA[<p>The following example shows you how you can toggle between plain text and text masked as a password by setting the displayAsPassword property on a TextInput control in Flex.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_displayAsPassword_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:CheckBox id="checkBox" label="displayAsPassword:" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you can toggle between plain text and text masked as a password by setting the <code>displayAsPassword</code> property on a TextInput control in Flex.</p>
<p>Full code after the jump.</p>
<p><span id="more-427"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_displayAsPassword_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:CheckBox id="checkBox"
                label="displayAsPassword:"
                labelPlacement="left"
                selected="true"
                change="textInput.displayAsPassword = checkBox.selected;" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TextInput id="textInput"
            text="password"
            displayAsPassword="true" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_displayAsPassword_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TextInput_displayAsPassword_test/bin/main.html" width="100%" height="150"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying a TextInput control\&#039;s text as a password in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/',contentID: 'post-427',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'displayAsPassword',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/01/05/displaying-a-textinput-controls-text-as-a-password-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the TitleWindow container to display status messages</title>
		<link>http://blog.flexexamples.com/2007/08/22/using-the-titlewindow-container-to-display-status-messages/</link>
		<comments>http://blog.flexexamples.com/2007/08/22/using-the-titlewindow-container-to-display-status-messages/#comments</comments>
		<pubDate>Thu, 23 Aug 2007 06:10:49 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TitleWindow]]></category>
		<category><![CDATA[displayAsPassword]]></category>
		<category><![CDATA[showCloseButton]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/22/using-the-titlewindow-container-to-display-status-messages/</guid>
		<description><![CDATA[<p>Another example of something I&#8217;ve seen lately on the Internet, so I thought I&#8217;d build it in Flex. This time I usea TitleWindow to display the status message of a login form. You can close the message by clicking the X button in the upper-right corner of the title window.</p> <p>Note that there is no [...]]]></description>
			<content:encoded><![CDATA[<p>Another example of something I&#8217;ve seen lately on the Internet, so I thought I&#8217;d build it in Flex. This time I usea TitleWindow to display the status message of a login form. You can close the message by clicking the X button in the upper-right corner of the title window.</p>
<p>Note that there is no correct login. It will display the error message every time. In a future example I&#8217;ll try and add some fancy fade in/out effects or resize effects on the error message to give it that proper &#8220;Web 2.0 feel&#8221;.</p>
<p>Full code after the jump.</p>
<p><span id="more-109"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TitleWindow_height_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/08/22/using-the-titlewindow-container-to-display-status-messages/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        TitleWindow {
            cornerRadius: 0;
            backgroundColor: red;
            borderColor: red;
            borderAlpha: 1.0;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function showTitleWindow():void {
                titleWindow.height = 28;
            }

            private function hideTitleWindow():void {
                titleWindow.height = 0;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:VBox&gt;
        &lt;mx:TitleWindow id="titleWindow"
                title="Invalid username and/or password."
                showCloseButton="true"
                width="100%"
                height="0"
                close="hideTitleWindow()" /&gt;

        &lt;mx:Form&gt;
            &lt;mx:FormItem label="Username:"&gt;
                &lt;mx:TextInput id="username"
                        maxChars="24" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="Password:"&gt;
                &lt;mx:TextInput id="password"
                        maxChars="24"
                        displayAsPassword="true" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem&gt;
                &lt;mx:Button label="Login"
                        click="showTitleWindow()" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:VBox&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TitleWindow_height_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TitleWindow_height_test/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Using the TitleWindow container to display status messages on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/08/22/using-the-titlewindow-container-to-display-status-messages/',contentID: 'post-109',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'displayAsPassword,showCloseButton',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/08/22/using-the-titlewindow-container-to-display-status-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

