到了4.0,必须在skin皮肤类当中设置cornerRadius。 具体: 编写一个CustomPanelSkin类,去掉默认的updatePlayList方法,自己重新写一个。同时将变量cornerRadius进行绑定。 示例源码: /* Define the skin elements that should not be colorized. For panel, border and title backround are skinned, but the content area and title text are not. */ static private const exclusions:Array = ["background", "titleDisplay", "contentGroup"]; /** * @copy spark.skins.SparkSkin#colorizeExclusions */ override public function get colorizeExclusions():Array {return exclusions;} override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { if (getStyle("borderVisible") == true) { border.visible = true; background.left = background.top = background.right = background.bottom = 1; contents.left = contents.top = contents.right = contents.bottom = 1; } else { border.visible = false; background.left = background.top = background.right = background.bottom = 0; contents.left = contents.top = contents.right = contents.bottom = 0; } dropShadow.visible = getStyle("dropShadowVisible"); var cr:Number = getStyle("cornerRadius"); if (cornerRadius != cr) cornerRadius = cr; super.updateDisplayList(unscaledWidth, unscaledHeight); } [Bindable] public var cornerRadius:Number; 在这里改标题颜色->
设置flex4.0面板底部圆角
最新推荐文章于 2024-06-17 21:44:46 发布