<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Changing the background color of an error tip in Flex</title>
	<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Thu, 04 Dec 2008 23:42:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: t3</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-15929</link>
		<author>t3</author>
		<pubDate>Mon, 29 Sep 2008 06:00:22 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-15929</guid>
		<description>How do you control the position of the error?  Like alwyays force the error message to pop up from the left instead of the top.

Also, how do you control the position of the arrow that is part of the border?</description>
		<content:encoded><![CDATA[<p>How do you control the position of the error?  Like alwyays force the error message to pop up from the left instead of the top.</p>
<p>Also, how do you control the position of the arrow that is part of the border?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-15878</link>
		<author>peterd</author>
		<pubDate>Sat, 27 Sep 2008 02:11:04 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-15878</guid>
		<description>Yon,

I don't know that it is a "better" solution, but I posted another technique on the other entry: &lt;a href="http://blog.flexexamples.com/2007/09/01/customizing-a-flex-textinput-controls-error-color/#comment-15876" rel="nofollow"&gt;&lt;u&gt;"Customizing a Flex TextInput control's error color"&lt;/u&gt;&lt;/a&gt;

I'll probably try and convert my solution to a full blog entry later this evening when I get some time (if you wanted to hold out for a SWF and all that stuff).

Peter

&lt;p class="new"&gt;New entry posted: &lt;a href="http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/" rel="nofollow"&gt;&lt;u&gt;"Dynamically styling error tips in Flex"&lt;/u&gt;&lt;/a&gt;&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Yon,</p>
<p>I don&#8217;t know that it is a &#8220;better&#8221; solution, but I posted another technique on the other entry: <a href="http://blog.flexexamples.com/2007/09/01/customizing-a-flex-textinput-controls-error-color/#comment-15876" rel="nofollow"><u>&#8220;Customizing a Flex TextInput control&#8217;s error color&#8221;</u></a></p>
<p>I&#8217;ll probably try and convert my solution to a full blog entry later this evening when I get some time (if you wanted to hold out for a SWF and all that stuff).</p>
<p>Peter</p>
<p class="new">New entry posted: <a href="http://blog.flexexamples.com/2008/09/26/dynamically-styling-error-tips-in-flex/" rel="nofollow"><u>&#8220;Dynamically styling error tips in Flex&#8221;</u></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yon</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-15877</link>
		<author>Yon</author>
		<pubDate>Sat, 27 Sep 2008 01:39:35 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-15877</guid>
		<description>sorry for filling your forums, just found the answer for my own question.
In yet another thread peted shows us how to Use embedded fonts with tool tips in Flex

And here i found my answer, yet it wasnt as straith forward as i would've wanted.
In the validation i set a flag with either the status of warning, error

Also when i initialize my Textinput i add an event listener like this
&lt;pre class="code"&gt;
myTxt.addEventListener(ToolTipEvent.TOOL_TIP_SHOWN, textInput_toolTipShown);
&lt;/pre&gt;

finally on the event listener i check for my flag
&lt;pre class="code"&gt;
private function textInput_toolTipShown(evt:ToolTipEvent):void {
    var tt:ToolTip = evt.toolTip as ToolTip;
    if (errorState) {
        myTxt.setStyle("errorColor", "#FF0000");
        tt.setStyle("borderColor","#FF0000");
    } else { 
        tt.setStyle("borderColor","#FFCC00");
        myTxt.setStyle("errorColor", "#FFCC00");
    }
}
&lt;/pre&gt;

I'm posting it so if anyone has the same problem theres some reference of how i did it
also if u have a better solution it be great to see it.

Regards,</description>
		<content:encoded><![CDATA[<p>sorry for filling your forums, just found the answer for my own question.<br />
In yet another thread peted shows us how to Use embedded fonts with tool tips in Flex</p>
<p>And here i found my answer, yet it wasnt as straith forward as i would&#8217;ve wanted.<br />
In the validation i set a flag with either the status of warning, error</p>
<p>Also when i initialize my Textinput i add an event listener like this</p>
<pre class="code">
myTxt.addEventListener(ToolTipEvent.TOOL_TIP_SHOWN, textInput_toolTipShown);
</pre>
<p>finally on the event listener i check for my flag</p>
<pre class="code">
private function textInput_toolTipShown(evt:ToolTipEvent):void {
    var tt:ToolTip = evt.toolTip as ToolTip;
    if (errorState) {
        myTxt.setStyle("errorColor", "#FF0000");
        tt.setStyle("borderColor","#FF0000");
    } else {
        tt.setStyle("borderColor","#FFCC00");
        myTxt.setStyle("errorColor", "#FFCC00");
    }
}
</pre>
<p>I&#8217;m posting it so if anyone has the same problem theres some reference of how i did it<br />
also if u have a better solution it be great to see it.</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yon</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-15875</link>
		<author>Yon</author>
		<pubDate>Sat, 27 Sep 2008 00:23:25 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-15875</guid>
		<description>Sorry i made this post in another thread, but i posted here because i think it belongs more with the topic

Hi, i was wondering, how would you change dynamically the &lt;code&gt;errorTip&lt;/code&gt; color?

I want to set warnings and errors.
Warnings being yellow &#38; errors red.

Ive been trying to set
&lt;pre class="code"&gt;
errorTip {
    borderColor: #FF0000;
}
&lt;/pre&gt;

and then programatically change it to say
&lt;pre class="code"&gt;
warnTip {
    borderColor #FFCC00;
}
&lt;/pre&gt;

But i dont know what to set it to.
I was changing the whole TextInput style, so it would also change the &lt;code&gt;errorColor&lt;/code&gt; respectively, and that works fine.

Yet i dont know how to change the &lt;code&gt;errorTip&lt;/code&gt;, since i dont know to what element to apply the .styleName to

and applying it to the input as 
&lt;pre class="code"&gt;
setStyle("errorTip.borderColor", "#FFCC00")
&lt;/pre&gt;
or
&lt;pre class="code"&gt;
setStyle("errorTip", "#FFCC00")
&lt;/pre&gt;

dont seem to work either.

Any clues?</description>
		<content:encoded><![CDATA[<p>Sorry i made this post in another thread, but i posted here because i think it belongs more with the topic</p>
<p>Hi, i was wondering, how would you change dynamically the <code>errorTip</code> color?</p>
<p>I want to set warnings and errors.<br />
Warnings being yellow &amp; errors red.</p>
<p>Ive been trying to set</p>
<pre class="code">
errorTip {
    borderColor: #FF0000;
}
</pre>
<p>and then programatically change it to say</p>
<pre class="code">
warnTip {
    borderColor #FFCC00;
}
</pre>
<p>But i dont know what to set it to.<br />
I was changing the whole TextInput style, so it would also change the <code>errorColor</code> respectively, and that works fine.</p>
<p>Yet i dont know how to change the <code>errorTip</code>, since i dont know to what element to apply the .styleName to</p>
<p>and applying it to the input as </p>
<pre class="code">
setStyle("errorTip.borderColor", "#FFCC00")
</pre>
<p>or</p>
<pre class="code">
setStyle("errorTip", "#FFCC00")
</pre>
<p>dont seem to work either.</p>
<p>Any clues?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12909</link>
		<author>Joseph</author>
		<pubDate>Fri, 23 May 2008 15:50:44 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12909</guid>
		<description>Honestly, I hate agree, I love this blog's little teaching, simple, straight to the point and gets the task done!!

Thanks Peter!</description>
		<content:encoded><![CDATA[<p>Honestly, I hate agree, I love this blog&#8217;s little teaching, simple, straight to the point and gets the task done!!</p>
<p>Thanks Peter!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12904</link>
		<author>peterd</author>
		<pubDate>Fri, 23 May 2008 04:17:22 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12904</guid>
		<description>&lt;a href="http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12897" rel="nofollow"&gt;superabe&lt;/a&gt;,

I don't know of an easy way off the top of my head. But I'm sure you could make a custom skin or something which would do what you need. You'd have better luck asking on FlexCoders.

Sorry,
Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12897" rel="nofollow">superabe</a>,</p>
<p>I don&#8217;t know of an easy way off the top of my head. But I&#8217;m sure you could make a custom skin or something which would do what you need. You&#8217;d have better luck asking on FlexCoders.</p>
<p>Sorry,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12903</link>
		<author>peterd</author>
		<pubDate>Fri, 23 May 2008 04:15:19 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12903</guid>
		<description>&lt;a href="http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12896" rel="nofollow"&gt;Tony Fendall&lt;/a&gt;,

Setting the &lt;code&gt;borderColor&lt;/code&gt; is enough. I just set the &lt;code&gt;errorColor&lt;/code&gt; style so the colors would match (by default the &lt;code&gt;errorColor&lt;/code&gt; seems to be red (#FF0000)).

Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12896" rel="nofollow">Tony Fendall</a>,</p>
<p>Setting the <code>borderColor</code> is enough. I just set the <code>errorColor</code> style so the colors would match (by default the <code>errorColor</code> seems to be red (#FF0000)).</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: superabe</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12897</link>
		<author>superabe</author>
		<pubDate>Fri, 23 May 2008 00:21:33 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12897</guid>
		<description>any way to have a separate color for the border of the tooltip, so say red border, light yellow background ?</description>
		<content:encoded><![CDATA[<p>any way to have a separate color for the border of the tooltip, so say red border, light yellow background ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Fendall</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12896</link>
		<author>Tony Fendall</author>
		<pubDate>Fri, 23 May 2008 00:02:31 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12896</guid>
		<description>Was it nessisary to set the errorColor of the TextInput, or is setting the borderColor on the error tip not enough to change the color of the error tip itself?</description>
		<content:encoded><![CDATA[<p>Was it nessisary to set the errorColor of the TextInput, or is setting the borderColor on the error tip not enough to change the color of the error tip itself?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wilfried</title>
		<link>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12895</link>
		<author>Wilfried</author>
		<pubDate>Thu, 22 May 2008 21:05:19 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/22/changing-the-background-color-of-an-error-tip-in-flex/#comment-12895</guid>
		<description>Hello Peter,
Well, after having visited your website, I am sure that there is not a lot of blogs on the Web which contain as many technical informations and codes for Flex as yours. Thank you very much for that</description>
		<content:encoded><![CDATA[<p>Hello Peter,<br />
Well, after having visited your website, I am sure that there is not a lot of blogs on the Web which contain as many technical informations and codes for Flex as yours. Thank you very much for that</p>
]]></content:encoded>
	</item>
</channel>
</rss>
