ButtonBar的按钮可以重写一下里面创建按钮的函数,达到修改按钮的效果
override protected function createNavItem(label:String, icon:Class=null):IFlexDisplayObject { var _btn:Button = Button(super.createNavItem(label,icon)); var _textField:TextField = _btn.mx_internal::getTextField(); _textField.filters = myGlowFilter; return _btn; } private var _defaltColor:uint=0x000000; private var defaultFilters:Array; private function get myGlowFilter():Array { if( !defaultFilters ) { var defaultGF:GlowFilter = new GlowFilter(_defaltColor,1,2,2,50,1,false,false); defaultFilters = new Array(); defaultFilters.push( defaultGF ); } return defaultFilters; }
?