<?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: Extending the LinkButton control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 14:19:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-5270</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Thu, 20 Aug 2009 19:34:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-5270</guid>
		<description>@jason,

Try a combination of the &lt;code&gt;color&lt;/code&gt;, &lt;code&gt;textRollOverColor&lt;/code&gt;, and &lt;code&gt;textSelectedColor&lt;/code&gt; styles:

&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;&gt;

    &lt;mx:LinkButton id=&quot;lnkBtn&quot;
            label=&quot;The quick brown fox jumps over the lazy dog&quot;
            color=&quot;red&quot;
            textRollOverColor=&quot;haloOrange&quot;
            textSelectedColor=&quot;purple&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

There should be a few random examples at http://blog.flexexamples.com/?tag=textRollOverColor,textSelectedColor, although nothing specific to LinkButton. This may help also: http://blog.flexexamples.com/2007/08/26/changing-a-button-controls-text-color/

Peter</description>
		<content:encoded><![CDATA[<p>@jason,</p>
<p>Try a combination of the <code>color</code>, <code>textRollOverColor</code>, and <code>textSelectedColor</code> styles:</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 style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:LinkButton</span> id=<span style="color: #ff0000;">&quot;lnkBtn&quot;</span></span>
<span style="color: #000000;">            label=<span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog&quot;</span></span>
<span style="color: #000000;">            color=<span style="color: #ff0000;">&quot;red&quot;</span></span>
<span style="color: #000000;">            textRollOverColor=<span style="color: #ff0000;">&quot;haloOrange&quot;</span></span>
<span style="color: #000000;">            textSelectedColor=<span style="color: #ff0000;">&quot;purple&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>There should be a few random examples at <a href="http://blog.flexexamples.com/?tag=textRollOverColor,textSelectedColor" rel="nofollow">http://blog.flexexamples.com/?tag=textRollOverColor,textSelectedColor</a>, although nothing specific to LinkButton. This may help also: <a href="http://blog.flexexamples.com/2007/08/26/changing-a-button-controls-text-color/" rel="nofollow">http://blog.flexexamples.com/2007/08/26/changing-a-button-controls-text-color/</a></p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-5269</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Thu, 20 Aug 2009 17:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-5269</guid>
		<description>Rollover working, but can&#039;t seem to change the text color?</description>
		<content:encoded><![CDATA[<p>Rollover working, but can&#8217;t seem to change the text color?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-5266</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Thu, 20 Aug 2009 15:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-5266</guid>
		<description>For some reason my rollover isn&#039;t working. Nothing happens?  The selection works fine.  Also is there a way to change the font color as well?</description>
		<content:encoded><![CDATA[<p>For some reason my rollover isn&#8217;t working. Nothing happens?  The selection works fine.  Also is there a way to change the font color as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dandu</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-3796</link>
		<dc:creator>dandu</dc:creator>
		<pubDate>Mon, 17 Nov 2008 21:02:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-3796</guid>
		<description>I recently had a customer who was trying to debug his Flex components. Under certain circumstances the updateDisplayList() method of his component was getting called and it wasn&#039;t obvious why.</description>
		<content:encoded><![CDATA[<p>I recently had a customer who was trying to debug his Flex components. Under certain circumstances the updateDisplayList() method of his component was getting called and it wasn&#8217;t obvious why.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-3799</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Wed, 15 Oct 2008 14:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-3799</guid>
		<description>Ruslan,

Yes. If you want to remove the rollover color you can either set the &lt;code&gt;skin&lt;/code&gt; style to &lt;code&gt;null&lt;/code&gt;, or extend the LinkButtonSkin class (mx.skins.halo.LinkButtonSkin.as) and set the alpha to 0% in each skin state.

&lt;pre class=&quot;code&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;&gt;

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

            private function linkButton_click(evt:MouseEvent):void {
                Alert.show(evt.currentTarget.label + &quot; &quot; + evt.type);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:LinkButton id=&quot;defaultLinkButton&quot;
            label=&quot;Default LinkButton&quot;
            click=&quot;linkButton_click(event);&quot; /&gt;

    &lt;mx:LinkButton id=&quot;customSkinLinkButton&quot;
            label=&quot;Custom skin LinkButton&quot;
            skin=&quot;TransparentLinkButtonSkin&quot;
            click=&quot;linkButton_click(event);&quot; /&gt;

    &lt;mx:LinkButton id=&quot;nullSkinLinkButton&quot;
            label=&quot;Null skin LinkButton&quot;
            skin=&quot;{null}&quot;
            click=&quot;linkButton_click(event);&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

And then my custom skin, TransparentLinkButtonSkin.as, looks like this:
&lt;pre class=&quot;code&quot;&gt;
package {
    import mx.skins.halo.LinkButtonSkin;

    public class TransparentLinkButtonSkin extends LinkButtonSkin {
        public function TransparentLinkButtonSkin() {
            super();
        } // END function TransparentLinkButtonSkin();

        override protected function updateDisplayList(w:Number, h:Number):void {
            super.updateDisplayList(w, h);

            var cornerRadius:Number = getStyle(&quot;cornerRadius&quot;);

            graphics.clear();

            switch (name) {
                case &quot;upSkin&quot;:
                case &quot;overSkin&quot;:
                case &quot;downSkin&quot;:
                case &quot;disabledSkin&quot;:
                    // Draw invisible shape so we have a hit area.
                    drawRoundRect(
                        0, 0, w, h, cornerRadius,
                        0, 0);
                    break;
            } // END switch;
        } // END function updateDisplayList();
    } // END class TransparentLinkButtonSkin;
} // END package;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Ruslan,</p>
<p>Yes. If you want to remove the rollover color you can either set the <code>skin</code> style to <code>null</code>, or extend the LinkButtonSkin class (mx.skins.halo.LinkButtonSkin.as) and set the alpha to 0% in each skin state.</p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;<a href="http://www.adobe.com/2006/mxml&quot;&#038;gt" rel="nofollow">http://www.adobe.com/2006/mxml&quot;&#038;gt</a>;

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

            private function linkButton_click(evt:MouseEvent):void {
                Alert.show(evt.currentTarget.label + &quot; &quot; + evt.type);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:LinkButton id=&quot;defaultLinkButton&quot;
            label=&quot;Default LinkButton&quot;
            click=&quot;linkButton_click(event);&quot; /&gt;

    &lt;mx:LinkButton id=&quot;customSkinLinkButton&quot;
            label=&quot;Custom skin LinkButton&quot;
            skin=&quot;TransparentLinkButtonSkin&quot;
            click=&quot;linkButton_click(event);&quot; /&gt;

    &lt;mx:LinkButton id=&quot;nullSkinLinkButton&quot;
            label=&quot;Null skin LinkButton&quot;
            skin=&quot;{null}&quot;
            click=&quot;linkButton_click(event);&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<p>And then my custom skin, TransparentLinkButtonSkin.as, looks like this:</p>
<pre class="code">
package {
    import mx.skins.halo.LinkButtonSkin;

    public class TransparentLinkButtonSkin extends LinkButtonSkin {
        public function TransparentLinkButtonSkin() {
            super();
        } // END function TransparentLinkButtonSkin();

        override protected function updateDisplayList(w:Number, h:Number):void {
            super.updateDisplayList(w, h);

            var cornerRadius:Number = getStyle(&quot;cornerRadius&quot;);

            graphics.clear();

            switch (name) {
                case &quot;upSkin&quot;:
                case &quot;overSkin&quot;:
                case &quot;downSkin&quot;:
                case &quot;disabledSkin&quot;:
                    // Draw invisible shape so we have a hit area.
                    drawRoundRect(
                        0, 0, w, h, cornerRadius,
                        0, 0);
                    break;
            } // END switch;
        } // END function updateDisplayList();
    } // END class TransparentLinkButtonSkin;
} // END package;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruslan</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-3797</link>
		<dc:creator>Ruslan</dc:creator>
		<pubDate>Wed, 15 Oct 2008 13:11:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-3797</guid>
		<description>Hi, good sample. It there way to hide rollover background at all?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi, good sample. It there way to hide rollover background at all?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amy</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-3798</link>
		<dc:creator>Amy</dc:creator>
		<pubDate>Tue, 07 Oct 2008 01:35:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-3798</guid>
		<description>Thanks, this makes sense, but I want to take it one step further and put the custom linkButton in a linkBar. Can you explain how to do that, or point me to something that does? I haven&#039;t found anything. Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks, this makes sense, but I want to take it one step further and put the custom linkButton in a linkBar. Can you explain how to do that, or point me to something that does? I haven&#8217;t found anything. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William McBee</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-3794</link>
		<dc:creator>William McBee</dc:creator>
		<pubDate>Wed, 17 Sep 2008 21:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-3794</guid>
		<description>I&#039;m trying to follow this, however I&#039;m having a slight problem trying to streamline this into one mxml where I have (in order):

ButtonScrollingCanvas
  HBox
    Repeater
      LinkButton (label, toolTip, name and click(event) are all handled here)
    /Repeater
  /HBox
/ButtonScrollingCanvas

What I want to do is once a linkbutton is clicked, it should stay highlight until the next one is clicked.  And this method, while darn close, isn&#039;t working for me exactly.</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to follow this, however I&#8217;m having a slight problem trying to streamline this into one mxml where I have (in order):</p>
<p>ButtonScrollingCanvas<br />
  HBox<br />
    Repeater<br />
      LinkButton (label, toolTip, name and click(event) are all handled here)<br />
    /Repeater<br />
  /HBox<br />
/ButtonScrollingCanvas</p>
<p>What I want to do is once a linkbutton is clicked, it should stay highlight until the next one is clicked.  And this method, while darn close, isn&#8217;t working for me exactly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zavati Vladimir</title>
		<link>http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/comment-page-1/#comment-3795</link>
		<dc:creator>Zavati Vladimir</dc:creator>
		<pubDate>Tue, 09 Sep 2008 20:26:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/08/extending-the-linkbutton-control-in-flex/#comment-3795</guid>
		<description>Hello,

         Can you give an example about a secure authentification method for flex, I heard something about using Spring Acegi on Google, but didn&#039;t seen a good example.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>         Can you give an example about a secure authentification method for flex, I heard something about using Spring Acegi on Google, but didn&#8217;t seen a good example.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

