Archive

Archive for April, 2011

Flex 4 Dropdownlist and Accessibility

April 26, 2011 Leave a comment

Pressing up/down arrow keys when Flex 4 DropdownList has focus changes the selection. Sometimes the user would want to see the list before making the selection.This can be achieved by overriding the keydownHandler and changing the default behaviour to open the drop list if it is not already open.

override protected function keyDownHandler(event:KeyboardEvent):void
{
if(event.keyCode == Keyboard.DOWN && !isDropDownOpen)
openDropDown();
else
super.keyDownHandler(event);
}

Categories: Flex
Follow

Get every new post delivered to your Inbox.