Listen to the key events and prevent the default
 
Paste below in a new application to test
 
<mx:Script>
 <![CDATA[
  [Bindable]
  public var ComboDS:XML = new XML(
   <item datasource="CmbData">
    <object label="Mr."/>
    <object label="Mrs."/>
    <object label="Dr"/>
   </item>
  
  );
  
  private function DisableKey(event:KeyboardEvent):void{
   if (event.type == "keydown" || event.type == "keyup" ){
    event.preventDefault();
    return;
   }
  }
 ]]>
</mx:Script>
 

<mx:ComboBox dataProvider="{ComboDS.children()}" labelField="@label" keyUp="DisableKey(event);" keyDown="DisableKey(event);" />
 
hope this helps
 
Jason
 
 
-----Message d'origine-----
De : [email protected] [mailto:[EMAIL PROTECTED]De la part de shemeshkale
Envoyé : dimanche 10 septembre 2006 09:01
À : [email protected]
Objet : [flexcoders] Re: how to cancel down arrow on a combobox

anyone have an idea how to do this?

--- In [EMAIL PROTECTED]ups.com, "shemeshkale" <baldhead72@...> wrote:
>
> hello
> i m using FLEX 1.5 !!
> the ComboBox have a default behavior that when pressing the down/up
> arrows it selects the next/previous object in its list.
>
> how do i cancel this behavior???
>
> i need that arrow down/up on a ComboBox will do NOTHING !!
> how?
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to