<?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: Preventing users from clicking on an Accordion container&#8217;s header in Flex</title>
	<link>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 02:14:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13339</link>
		<author>peterd</author>
		<pubDate>Wed, 11 Jun 2008 02:02:44 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13339</guid>
		<description>Nick,

I've never really tried to disable keyboard+Accordion navigation, but if you want some rough and untested code, I'd probably recommend extending the Accordion container and overriding the &lt;code&gt;keyDownHandler()&lt;/code&gt; method:
&lt;pre class="code"&gt;
package comps {
    import mx.containers.Accordion;
    import flash.events.KeyboardEvent;

    public class MyAccordion extends Accordion {
        public function MyAccordion() {
            super();
        }

        override protected function keyDownHandler(evt:KeyboardEvent):void {
        }
    }
}
&lt;/pre&gt;

But, like I said, I haven't really tested the code. So your mileage may vary.

Peter

UPDATE: Actually, on that note, I turned this into today's entry. For more information, see &lt;a href="http://blog.flexexamples.com/2008/06/10/disabling-keyboard-navigation-on-the-accordion-container-in-flex/" rel="nofollow"&gt;&lt;u&gt;"Disabling keyboard navigation on the Accordion container in Flex"&lt;/u&gt;&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Nick,</p>
<p>I&#8217;ve never really tried to disable keyboard+Accordion navigation, but if you want some rough and untested code, I&#8217;d probably recommend extending the Accordion container and overriding the <code>keyDownHandler()</code> method:</p>
<pre class="code">
package comps {
    import mx.containers.Accordion;
    import flash.events.KeyboardEvent;

    public class MyAccordion extends Accordion {
        public function MyAccordion() {
            super();
        }

        override protected function keyDownHandler(evt:KeyboardEvent):void {
        }
    }
}
</pre>
<p>But, like I said, I haven&#8217;t really tested the code. So your mileage may vary.</p>
<p>Peter</p>
<p>UPDATE: Actually, on that note, I turned this into today&#8217;s entry. For more information, see <a href="http://blog.flexexamples.com/2008/06/10/disabling-keyboard-navigation-on-the-accordion-container-in-flex/" rel="nofollow"><u>&#8220;Disabling keyboard navigation on the Accordion container in Flex&#8221;</u></a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13338</link>
		<author>Nick</author>
		<pubDate>Wed, 11 Jun 2008 01:49:15 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13338</guid>
		<description>Hey Peter can you shoot me an email or show an example on how to disable the keyboard keys that I listed above? I would reaally appreciate it I can't figure this out and I kinda need it for this project thats due soon :)

Thanks 

- Nick</description>
		<content:encoded><![CDATA[<p>Hey Peter can you shoot me an email or show an example on how to disable the keyboard keys that I listed above? I would reaally appreciate it I can&#8217;t figure this out and I kinda need it for this project thats due soon :)</p>
<p>Thanks </p>
<p>- Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13208</link>
		<author>Nick</author>
		<pubDate>Tue, 03 Jun 2008 18:14:01 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13208</guid>
		<description>Good call Benjamin. Do you know of a demonstration or example to show how to disable the enter, spacebar, tab, up and down arrows on the keyboard on the accordion headers? Or maybe Peter can whip up a code for that also? :)</description>
		<content:encoded><![CDATA[<p>Good call Benjamin. Do you know of a demonstration or example to show how to disable the enter, spacebar, tab, up and down arrows on the keyboard on the accordion headers? Or maybe Peter can whip up a code for that also? :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin</title>
		<link>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13206</link>
		<author>Benjamin</author>
		<pubDate>Tue, 03 Jun 2008 15:43:26 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13206</guid>
		<description>Well, you should disable the keyboard listener too, page up and page down strokes could still ruin your application.
Still, it is a nice example of the accordion.</description>
		<content:encoded><![CDATA[<p>Well, you should disable the keyboard listener too, page up and page down strokes could still ruin your application.<br />
Still, it is a nice example of the accordion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13194</link>
		<author>Nick</author>
		<pubDate>Mon, 02 Jun 2008 21:15:11 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/05/30/preventing-users-from-clicking-on-an-accordion-containers-header-in-flex/#comment-13194</guid>
		<description>Thank you again Peter! This came in handy tremendously. Keep up the awesome blogging. If I could recommend something else that I would like to see is Flex and PHP examples :)

Thanks!

- Nick</description>
		<content:encoded><![CDATA[<p>Thank you again Peter! This came in handy tremendously. Keep up the awesome blogging. If I could recommend something else that I would like to see is Flex and PHP examples :)</p>
<p>Thanks!</p>
<p>- Nick</p>
]]></content:encoded>
	</item>
</channel>
</rss>
