<?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: Disabling keyboard navigation on the ComboBox control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/</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: Marcos Fedato</title>
		<link>http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/comment-page-1/#comment-8355</link>
		<dc:creator>Marcos Fedato</dc:creator>
		<pubDate>Thu, 23 Sep 2010 15:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/#comment-8355</guid>
		<description>Thanks a lot,works perfectly</description>
		<content:encoded><![CDATA[<p>Thanks a lot,works perfectly</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/comment-page-1/#comment-7977</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 22 Jun 2010 14:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/#comment-7977</guid>
		<description>@Peter deHaan 

Thanks youuuu Peter,  Really nice Work.</description>
		<content:encoded><![CDATA[<p>@Peter deHaan </p>
<p>Thanks youuuu Peter,  Really nice Work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/comment-page-1/#comment-7955</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 18 Jun 2010 14:24:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/#comment-7955</guid>
		<description>@Paul,

You can extend the ComboBox class, override the protected &lt;code&gt;keyDownHandler()&lt;/code&gt; method and just filter those keys before calling &lt;code&gt;super.keyDownHandler()&lt;/code&gt;, as seen in the following example:
&lt;pre lang=&quot;actionscript3&quot;&gt;

package comps {
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    
    import mx.controls.ComboBox;
    
    public class CustomComboBox extends ComboBox {
        public function CustomComboBox() {
            super();
        }
        
        override protected function keyDownHandler(evt:KeyboardEvent):void {
            switch (evt.keyCode) {
                case Keyboard.PAGE_DOWN:
                case Keyboard.PAGE_UP:
                    // abort
                    return;
                default:
                    super.keyDownHandler(evt);
            }
        }
    }
}
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@Paul,</p>
<p>You can extend the ComboBox class, override the protected <code>keyDownHandler()</code> method and just filter those keys before calling <code>super.keyDownHandler()</code>, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #9900cc; font-weight: bold;">package</span> comps <span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">KeyboardEvent</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.ui</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Keyboard</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>controls<span style="color: #000066; font-weight: bold;">.</span>ComboBox<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> CustomComboBox <span style="color: #0033ff; font-weight: bold;">extends</span> ComboBox <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> CustomComboBox<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        override <span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> keyDownHandler<span style="color: #000000;">&#40;</span>evt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">KeyboardEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">switch</span> <span style="color: #000000;">&#40;</span>evt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">keyCode</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
                <span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #004993;">Keyboard</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PAGE_DOWN</span><span style="color: #000066; font-weight: bold;">:</span>
                <span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #004993;">Keyboard</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PAGE_UP</span><span style="color: #000066; font-weight: bold;">:</span>
                    <span style="color: #009900; font-style: italic;">// abort</span>
                    <span style="color: #0033ff; font-weight: bold;">return</span><span style="color: #000066; font-weight: bold;">;</span>
                <span style="color: #0033ff; font-weight: bold;">default</span><span style="color: #000066; font-weight: bold;">:</span>
                    <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>keyDownHandler<span style="color: #000000;">&#40;</span>evt<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/comment-page-1/#comment-7917</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 15 Jun 2010 22:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/#comment-7917</guid>
		<description>how to disable  only PGDN and PGUP?</description>
		<content:encoded><![CDATA[<p>how to disable  only PGDN and PGUP?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/comment-page-1/#comment-7335</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 23 Mar 2010 22:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/#comment-7335</guid>
		<description>@av,

In the above example/SWF I don&#039;t even see it acknowledging the arrow keys. Are you using different code?

Peter</description>
		<content:encoded><![CDATA[<p>@av,</p>
<p>In the above example/SWF I don&#8217;t even see it acknowledging the arrow keys. Are you using different code?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: av</title>
		<link>http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/comment-page-1/#comment-7325</link>
		<dc:creator>av</dc:creator>
		<pubDate>Tue, 23 Mar 2010 05:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/16/disabling-keyboard-navigation-on-the-combobox-control-in-flex/#comment-7325</guid>
		<description>When I iterate the combobox list using down arrow, every alternate/2nd item in the combobox is highlighted,  instead of every item. Why is an item in the middle being skipped? Any clues? 

Thank you</description>
		<content:encoded><![CDATA[<p>When I iterate the combobox list using down arrow, every alternate/2nd item in the combobox is highlighted,  instead of every item. Why is an item in the middle being skipped? Any clues? </p>
<p>Thank you</p>
]]></content:encoded>
	</item>
</channel>
</rss>

