You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Miguel Ferreira <mi...@hotmail.com> on 2013/12/19 12:15:18 UTC

bug default button

Hi all,

i am working in a application that were using mx:button and i remove it and replaced by the spark  button with a personalized skin.
Until here no problem at all all went smooth, but when i was testing i noticed that when the application have a default button setted for a title window or a panel for example the application is not setting the correct skin class for the button
the code is simple:
s|Button{	skinClass: ClassReference("assets.skinClasses.BSButtonSkin");}

in some special case i made a test like this:
override public function set defaultButton(value:IFlexDisplayObject):void		{			super.defaultButton = value;						if (value is Button)				(this.defaultButton as Button).setStyle("skinClass", BSButtonSkin);						}
because i have a dashboard that extends panel and with this test everything worked as planned.

But there is a away to set globaly this defaultButton skin? Why it work in mx the skinning and with spark the skinning is lost completely.

Kind regards,Miguel FErreira 		 	   		  

Re: bug default button

Posted by Alex Harui <ah...@adobe.com>.
For various reasons, Spark Buttons have two skins, one for the
emphasized/default-button state.  Specify the default button's skin via:

s|Button.emphasized {skinClass: ClassReference("<default button skin
class"");}

On 12/19/13 3:15 AM, "Miguel Ferreira" <mi...@hotmail.com>
wrote:

>Hi all,
>
>i am working in a application that were using mx:button and i remove it
>and replaced by the spark  button with a personalized skin.
>Until here no problem at all all went smooth, but when i was testing i
>noticed that when the application have a default button setted for a
>title window or a panel for example the application is not setting the
>correct skin class for the button
>the code is simple:
>s|Button{	skinClass: ClassReference("assets.skinClasses.BSButtonSkin");}
>
>in some special case i made a test like this:
>override public function set
>defaultButton(value:IFlexDisplayObject):void		{			super.defaultButton =
>value;						if (value is Button)				(this.defaultButton as
>Button).setStyle("skinClass", BSButtonSkin);						}
>because i have a dashboard that extends panel and with this test
>everything worked as planned.
>
>But there is a away to set globaly this defaultButton skin? Why it work
>in mx the skinning and with spark the skinning is lost completely.
>
>Kind regards,Miguel FErreira