actionscript 3 - How can I tab accross a ButtonBar component in Flex? -


i have button bar inf flex along several other input controls, have set tabindex property each control , goes until tab buttonbar.

the buttonbar has 3 buttons tabbing it, first button gets focus, tab again , focus goes top control...

how can make tabbing go through buttons in flex button bar? there way or need create individual buttons this?

this seems possible bug me...

the component written user must press left/right arrow keys when focus within bar traverse buttons--this standard gui behavior (you see in other places radio button groups). if sdk source buttonbar, can see they've explicitly disabled tab focus each child button it's created:

override protected function createnavitem(                                         label:string,                                         icon:class = null):iflexdisplayobject     {         var newbutton:button = button(navitemfactory.newinstance());          // set tabenabled false individual buttons don't focus.         newbutton.focusenabled = false;     ... 

if want change behavior, can make subclass it, this:

package {     import mx.controls.button;     import mx.controls.buttonbar;     import mx.core.iflexdisplayobject;      public class focusablebuttonbar extends buttonbar {         public function focusablebuttonbar()         {             super();             this.focusenabled = false;         }          override protected function createnavitem(                     label:string, icon:class=null):iflexdisplayobject         {             var btn:button = button(super.createnavitem(label, icon));             btn.focusenabled = true;             return btn;         }     } } 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -