How to make the closebutton of a titlewindows be fucusable?
I tried this but still don't work:
this.mx_internal::closeButton.focusEnabled = true;
I need to the focus go to the closebutton using TAB.
Somebody can help me? Tanks.
Which version of Flex and which titleWindow (MX or Spark)?
these look like dirty hacks but here you're:
override protected function createChildren():void
mx_internal::closeButton.focusEnabled = true;
so in your custom title window .mxml add above to your fx:Script code
override protected function partAdded(partName:String, instance:Object) : void
if(instance == this.closeButton)
this.closeButton.focusEnabled = true;
again, add above to fx;Script section in your title window instance component .mxml
I think that could be contrary to systems HIGs - if you provide just "Cancel" option to your window features (is this like form, settings window?) it will be focusable by default with TAB and can close window on itself.