ColorPicker的操作会影响Button按钮的样式,需注意~~~

ColorPicker的操作会将Button的样式修改,具体看下面的例子..

例如:
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"  xmlns:c="c.*">

 
      import c.ImageResource;
   
   import mx.controls.Alert;
   import mx.managers.FocusManager;
   import mx.managers.PopUpManager;
   
   import spark.components.Form;
   import spark.components.Group;
   import spark.components.Panel;
   import spark.skins.spark.ButtonSkin;
   protected function filterBtn_clickHandler(event:MouseEvent):void
   {
    var p:Panel = PopUpManager.createPopUp(this, Panel) as Panel;
    p.x=600;
   }

  ]]>
 
 
  @namespace s "library://ns.adobe.com/flex/spark";
  @namespace mx "library://ns.adobe.com/flex/mx";
  .bstyle{
      skin-class:ClassReference( '***' );
  }
 

 
  
 
 

 
 <-- 先单机这个按钮,使其有焦点,FocusManager管理器把这个付给defButton -->
 
 <-- 两次点击这个, 会触发FocusManager的 focusManager.defaultButtonEnabled = true;里面的处理会将defButton按钮的emphasized属性设置为true,并在styleName后面拼上" emphasized"
 因此,如果filterBtn的样式"***"如果没有对应的"*** emphasized"会导致样式混乱,特别是在样式里设置"skin-class"属性,会导致皮肤丢失-->
 

你可能感兴趣的:(flex,button,library,application,function,import,c)