The Artima Developer Community
Sponsored Link

Flex 4 Fun Forum
Button Skinning in FLex 4

1 reply on 1 page. Most recent reply: Jan 9, 2019 7:48 PM by wqiangw wwqee

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
     
Flat View: This topic has 1 reply on 1 page
Royos Jacob

Posts: 1
Nickname: ashvin203
Registered: Jan, 2011

Button Skinning in FLex 4 Posted: Jan 31, 2011 1:37 AM
Reply to this message Reply
Advertisement
Hello,

I am a newbie to Flex 4 and am trying to do some skinning to my controls in Flex 4. I have having problem to display the label on my buttons.

Earlier the skinning were being done on the button, but the label was not being displayed. So I included the following code :

<s:Label id="labelDisplay">

After including the above, the label is being displayed but the colour of the label is very pale grey while normally it should be black unless I change it to some other colour. Can anyone help me with this issue? Am i missing something in my codes below.


I am using a .css file and a .mxml file as my host component (codes are shown below) for skinning my button components.


CODE FROM MXML FILE:

<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<!-- host component -->
<fx:Metadata>
[HostComponent("spark.components.Button")]
</fx:Metadata>

<!-- states -->
<s:states>
<s:State name="disabled" />
<s:State name="down" />
<s:State name="over" />
<s:State name="up" />
</s:states>
<s:Label id="labelDisplay"
left="10" right="10" top="5" bottom="5"
horizontalCenter="0" verticalCenter="1" color="#000000"/>

<!-- SkinParts
name=labelDisplay, type=spark.components.supportClasses.TextBase, required=false
-->
<!-- <s:Group top="0"
bottom="0"
left="0"
right="0">-->
<!--<s:Group>-->

<s:BitmapImage width="100%"
height="100%"
source="{getStyle('upSkin')}"
includeIn="up"/>
<s:BitmapImage width="100%"
height="100%"
source="{getStyle('overSkin')}"
includeIn="over"/>
<s:BitmapImage width="100%"
height="100%"
source="{getStyle('downSkin')}"
includeIn="down"/>
<s:BitmapImage width="100%"
height="100%"
source="{getStyle('disabledSkin')}"
includeIn="disabled"/>
<!--</s:Group>-->
</s:Skin>



CODE FROM CSS FILE:

@namespace mx "library://ns.adobe.com/flex/mx";
@namespace s "library://ns.adobe.com/flex/spark";

s|Button
{
disabledSkin: Embed(source="reelmanager_skins.swf", symbol="Button_disabledSkin");
downSkin: Embed(source="reelmanager_skins.swf", symbol="Button_downSkin");
overSkin: Embed(source="reelmanager_skins.swf", symbol="Button_overSkin");
upSkin: Embed(source="reelmanager_skins.swf", symbol="Button_upSkin");
}


Your precious help is required.

Many thanks.


wqiangw wwqee

Posts: 3
Nickname: wqiang
Registered: Jan, 2019

Re: Button Skinning in FLex 4 Posted: Jan 9, 2019 7:48 PM
Reply to this message Reply
This Cheap Jordan Shoes particular outward exhibition (2019's distort about the traditional Ben Hanks film Large) is actually completely embodied through Martin, that right now should juggle operating the woman's Cheap Jordans technology organization whilst additionally going to center college Rely on Issa Rae, Regina Hallway, and also Jordan Basketball Shoes Refinery29 Z-lister Marsai Martin to offer us all one of many Jordan Store initial feel-good motion pictures regarding 2019.

Flat View: This topic has 1 reply on 1 page
     


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use