You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by derChris <ch...@goal-games.de> on 2014/04/03 17:00:52 UTC
Cannot remove focus on spark.skins.mobile.TextAreaSkin
Hi,
I am trying to remove the focus of a spark.skins.mobile.TextAreaSkin but
this doesn't work...
My Code:
import de.assets.ChatTextFieldBackground;
import de.assets.ChatTextFieldBackgroundBorder;
import spark.skins.mobile.TextAreaSkin;
public class LeagueBoardTextAreaSkin extends TextAreaSkin
{
private var background:ChatTextFieldBackground;
public function LeagueBoardTextAreaSkin()
{
super();
measuredDefaultHeight = 50;
setStyle("paddingTop", 10);
setStyle("paddingBottom", 25);
setStyle("paddingLeft", 10);
setStyle("paddingRight", 10);
setStyle("borderStyle", "none");
setStyle("borderSkin", null);
setStyle("focusSkin", null);
setStyle("focusAlpha", 0);
setStyle("focusThickness", 0);
setStyle("dropShadowEnabled", false);
setStyle("dropShadowVisible", false);
setStyle("dropShadowColor", 0x00FF00);setStyle("shadowDistance", 20);
setStyle("highlightColor", 0x00FF00);
setStyle("focusRoundedCorners", 20);
setStyle("borderVisible", false);
setStyle("errorSkin", null);
setStyle("focusSkin", null);
focusRect = null;
}
override protected function createChildren():void
{
super.createChildren();
background = new ChatTextFieldBackground();
addChildAt(background, 0);
}
/**
* @private
*/
override protected function drawBackground(unscaledWidth:Number,
unscaledHeight:Number):void
{
background.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
}
override public function drawFocus(isFocused:Boolean):void
{
super.drawFocus(false);
}
Any idea what I have to do to get rid of the blue
focus-highlight-dropShadow-Thing?
Best regards,
Christian
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Cannot-remove-focus-on-spark-skins-mobile-TextAreaSkin-tp5971.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Cannot remove focus on spark.skins.mobile.TextAreaSkin
Posted by derChris <ch...@goal-games.de>.
Thank you - that was the solution! Thanks!!!
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Cannot-remove-focus-highlight-on-spark-skins-mobile-TextAreaSkin-tp5971p6052.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Cannot remove focus on spark.skins.mobile.TextAreaSkin
Posted by Alex Harui <ah...@adobe.com>.
Try some of that code on the component instead of the skin
Sent via the PANTECH Discover, an AT&T 4G LTE smartphone.
derChris <ch...@goal-games.de> wrote:
Hi,
I am trying to remove the focus of a spark.skins.mobile.TextAreaSkin but
this doesn't work...
My Code:
import de.assets.ChatTextFieldBackground;
import de.assets.ChatTextFieldBackgroundBorder;
import spark.skins.mobile.TextAreaSkin;
public class LeagueBoardTextAreaSkin extends TextAreaSkin
{
private var background:ChatTextFieldBackground;
public function LeagueBoardTextAreaSkin()
{
super();
measuredDefaultHeight = 50;
setStyle("paddingTop", 10);
setStyle("paddingBottom", 25);
setStyle("paddingLeft", 10);
setStyle("paddingRight", 10);
setStyle("borderStyle", "none");
setStyle("borderSkin", null);
setStyle("focusSkin", null);
setStyle("focusAlpha", 0);
setStyle("focusThickness", 0);
setStyle("dropShadowEnabled", false);
setStyle("dropShadowVisible", false);
setStyle("dropShadowColor", 0x00FF00);setStyle("shadowDistance", 20);
setStyle("highlightColor", 0x00FF00);
setStyle("focusRoundedCorners", 20);
setStyle("borderVisible", false);
setStyle("errorSkin", null);
setStyle("focusSkin", null);
focusRect = null;
}
override protected function createChildren():void
{
super.createChildren();
background = new ChatTextFieldBackground();
addChildAt(background, 0);
}
/**
* @private
*/
override protected function drawBackground(unscaledWidth:Number,
unscaledHeight:Number):void
{
background.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
}
override public function drawFocus(isFocused:Boolean):void
{
super.drawFocus(false);
}
Any idea what I have to do to get rid of the blue
focus-highlight-dropShadow-Thing?
Best regards,
Christian
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Cannot-remove-focus-on-spark-skins-mobile-TextAreaSkin-tp5971.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.