<?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>Reality And A Half &#187; ria</title>
	<atom:link href="http://reality-and-a-half.multiversum.com/tag/ria/feed/" rel="self" type="application/rss+xml" />
	<link>http://reality-and-a-half.multiversum.com</link>
	<description>Mentionable ideas and projects in the digital space</description>
	<lastBuildDate>Wed, 09 May 2012 09:17:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Get more control over the Flex DateField component</title>
		<link>http://reality-and-a-half.multiversum.com/get-more-control-over-the-flex-datefield-component/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-more-control-over-the-flex-datefield-component</link>
		<comments>http://reality-and-a-half.multiversum.com/get-more-control-over-the-flex-datefield-component/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 15:00:57 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Werkzeuge]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[DateField]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[mxml]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://reality-and-a-half.multiversum.com/?p=121</guid>
		<description><![CDATA[I really messed up with the standard Flex DateField component trying to get rid of this annoying text field left to the date icon. In my opinion Flex gives you too less control over all of the in a DateField included components. There is no attribute or style available to hide the TextInput field. But [...]]]></description>
			<content:encoded><![CDATA[<p>I really messed up with the standard Flex DateField component trying to get rid of this annoying text field left to the date icon. In my opinion Flex gives you too less control over all of the in a DateField included components. There is no attribute or style available to hide the TextInput field.</p>
<p>But fortunately it&#8217;s very easy to extend Flex components. For a project I was working I pragmatically turned off the visibility of the input field by making the TextInput field child object accessible to the outer world by adding a getter and a setter method for the ComboBase textField class property. This gives us full control over the input field. Instead of just turning visibility off you can of change other properties as the width or height.</p>
<p>The actionscript extension class (DateChooserPopup.as)<br />
<span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif; "> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="color: #ad01d6;">package</span> customComponents</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;">import</span> mx.controls.DateField;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;">import</span> mx.controls.TextInput;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;">public</span> <span style="color: #ad01d6;">class</span> DateChooserPopup <span style="color: #3c3dff;">extends</span> DateField</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;"> public</span> <span style="color: #44a979;">function</span> DateChooserPopup()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;">super</span>();</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;">public</span> <span style="color: #44a979;">function</span> <span style="color: #3c3dff;">set</span> TextInputField( textInput:TextInput ):<span style="color: #3c3dff;">void</span> {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;">this</span>.textInput = textInput;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;">public</span> <span style="color: #44a979;">function</span> <span style="color: #3c3dff;">get</span> TextInputField():TextInput {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span><span style="color: #3c3dff;">return</span> <span style="color: #3c3dff;">this</span>.textInput;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px;"><span style="white-space: pre;"> <span style="white-space: normal;"><span style="white-space: pre;"> </span>}</span></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;">}</p>
<div><span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: normal;"><br />
</span></span></div>
<p>Now we use the new component within the MXML main file:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #a71206;"><span style="color: #3c00ff;">&lt;mx:Application</span><span style="color: #000000;"> xmlns:mx=&#8221;</span>http://www.adobe.com/2006/mxml<span style="color: #000000;">&#8221; width=&#8221;</span>640<span style="color: #000000;">&#8221; height=&#8221;</span>445<span style="color: #000000;">&#8221; layout=&#8221;</span>absolute<span style="color: #000000;">&#8221; backgroundGradientColors=&#8221;</span>[#FFFFFF, #FFFFFF]<span style="color: #000000;">&#8221; xmlns:CUSTComp=&#8221;</span><span style="color: #000000;">customComponents.*</span><span style="color: #000000;">&#8220;</span><span style="color: #3c00ff;">&gt;</span></p>
<div><span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #3c00ff; font-size: small;"><span style="line-height: normal;"></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;"><span style="color: #3c00ff;"> &lt;CUSTComp:DateChooserPopup</span> creationComplete=&#8221;<span style="color: #3c3dff;">this</span>.TextInputField.visible=false&#8221; <span style="color: #3c00ff;">/&gt;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3c00ff;">&lt;/mx:Application&gt;</p>
<div><span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #3c00ff; font-size: small;"><span style="line-height: normal;"><br />
</span></span></div>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3c00ff;"><span style="font-size: small;"><span style="font-size: small;"><span><br />
</span></span></span></p>
<p></span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://reality-and-a-half.multiversum.com/get-more-control-over-the-flex-datefield-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

