Skin in flex

Skin in flex

Hi.....

please give an example for
How do you create skinning for a component?

Thanks

View Answers

October 20, 2010 at 5:40 PM

Ans:

In this example you can see how we can make a skin for a component.

main.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
   xmlns:s="library://ns.adobe.com/flex/spark" 
   xmlns:mx="library://ns.adobe.com/flex/mx" 
   minWidth="955" minHeight="600">
<s:Panel title="Skin state Example" width="169">
<s:Button id="skinButton" 
  label="Skin Button" 
  x="28" y="30" 
  skinClass="CustomSkin"/>
</s:Panel>
</s:Application>

CustomSkin.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" 
 xmlns:s="library://ns.adobe.com/flex/spark" 
             xmlns:fb="http://ns.adobe.com/flashbuilder/2009" 
 minWidth="21" minHeight="21">    
    <!-- host component -->
    <fx:Metadata>
        [HostComponent("spark.components.Button")]
    </fx:Metadata>
<!-- states -->
<s:states>
<s:State name="up" />
<s:State name="over" />
<s:State name="down" />
<s:State name="disabled" />
</s:states>
<s:Rect left="0" right="0" top="0" bottom="0" 
width="69" height="20" radiusX="20" radiusY="20">
<s:stroke>
<s:SolidColorStroke color="0x000000" weight="2"/>
</s:stroke>
<!-- Add this fill to make the "hit area" cover the entire button. -->
<s:fill>
<s:SolidColor color="0xFFFFFF"/>
</s:fill>
</s:Rect>    
    <s:Label id="labelDisplay"
 color.up="red" color.over="Green" color.down="blue"
             horizontalCenter="0" verticalCenter="0"
             left="10" right="10" top="10" bottom="10" 
 fontFamily="verdana" fontWeight="bold">
    </s:Label>    
</s:SparkSkin>









Related Tutorials/Questions & Answers:
Skin in flex
to skin a component in flex? Please give me the answer ASAP Thanks  ... graphics, called graphical skins in Flex. 2. Programmatic skin : A vector graphic, called a programmatic skin in Flex. 3. Stateful skin : A type of programmatic
Skin in flex
Skin in flex  hi....... please tell me about that What is skin in flex? and how it is used? please give an example so i can apply..... Thanks
Advertisements
Skin in flex
Skin in flex  Hi..... please give an example for How do you create skinning for a component? Thanks
Flex Skin Design
Flex Skin Design Adobe Flex is a highly productive, free open source software... be designed by installing and downloading the Flex skin extension provided... the designers to create and control the new skins. ADS_TO_REPLACE_1 Flex skin has
Flex Skin index
Skin Component in flex : Skin is the process of changing component appearance... types of skins in flex. 1. Graphical skin : This skin are applying through Images that define the appearance of the skin.ADS_TO_REPLACE_1 Graphical skin
Custom skin
Custom skin  Hi..... How can I make a custom skin for focusSkin property of component? please give me an example for that so i can clearly understand.....ADS_TO_REPLACE_1 Thanks   Ans: you need to set the focusSkin
ModuleNotFoundError: No module named 'skin'
ModuleNotFoundError: No module named 'skin'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'skin' How to remove the ModuleNotFoundError: No module named 'skin' error
ModuleNotFoundError: No module named 'django-skin'
ModuleNotFoundError: No module named 'django-skin'  Hi, My Python... 'django-skin' How to remove the ModuleNotFoundError: No module named 'django-skin' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'sanic-skin'
ModuleNotFoundError: No module named 'sanic-skin'  Hi, My Python... 'sanic-skin' How to remove the ModuleNotFoundError: No module named 'sanic-skin' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'Shed-Skin'
ModuleNotFoundError: No module named 'Shed-Skin'  Hi, My Python... 'Shed-Skin' How to remove the ModuleNotFoundError: No module named 'Shed-Skin' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'starlette-skin'
ModuleNotFoundError: No module named 'starlette-skin'  Hi, My... named 'starlette-skin' How to remove the ModuleNotFoundError: No module named 'starlette-skin' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'wire-skin'
ModuleNotFoundError: No module named 'wire-skin'  Hi, My Python... 'wire-skin' How to remove the ModuleNotFoundError: No module named 'wire-skin' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'Shed-Skin'
ModuleNotFoundError: No module named 'Shed-Skin'  Hi, My Python... 'Shed-Skin' How to remove the ModuleNotFoundError: No module named 'Shed-Skin' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'wire-skin'
ModuleNotFoundError: No module named 'wire-skin'  Hi, My Python... 'wire-skin' How to remove the ModuleNotFoundError: No module named 'wire-skin' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'django-skin'
ModuleNotFoundError: No module named 'django-skin'  Hi, My Python... 'django-skin' How to remove the ModuleNotFoundError: No module named 'django-skin' error? Thanks   Hi, In your python environment
Version of wicket>wicket-site-skin dependency
List of Version of wicket>wicket-site-skin dependency
ModuleNotFoundError: No module named 'blanc-django-admin-skin'
ModuleNotFoundError: No module named 'blanc-django-admin-skin'  Hi...: No module named 'blanc-django-admin-skin' How to remove the ModuleNotFoundError: No module named 'blanc-django-admin-skin' error? Thanks   
Flex Looping
Flex Looping  I need example for flex looping mechanisam example
IFlexDisplayObject in flex
IFlexDisplayObject in flex  Hi....... Where do you normally use IFlexDisplayObject? ThanksADS_TO_REPLACE_1   Ans: The IFlexDisplayObject interface defines the interface for skin elements. At a minimum, a skin must
Flex - Framework
Flex  database conectivity in flex
Flex Combobox
Flex Combobox  flex combobox with database as dataprovider   You can visit the following link for detailed tutorial on the topic. May this will be helpful to you. http://www.roseindia.net/flex/flex-combo-box.shtml
Flex basic
Flex basic  Hi...... please just tell me about Can we run Flex applications in MAC? Thanks
Flex and Java
Flex and Java  hi..... Please give similiarities between Java and Flex. Thanks
Flex event
Flex event  Hi.... Please tell me about How to create your own event in flex? Thanks
Flex and Java
Flex and Java  Hi...... Give the name of Collection which can be mapped to java and Flex and vice-versa. please give the name of all collections which is used in flex and java.. Thanks
Flex and Java
Flex and Java  Hi.... What are the config files that are used to connect Java and Flex applications? Please provide the solution of this prob so i connect java and flex.... Thanks
Maven Dependency wicket-site-skin >> 1.2.6
You should include the dependency code given in this page to add Maven Dependency of wicket >> wicket-site-skin version1.2.6 in your project
Flex as a Service
Flex as a Service  Hi....... just tell me about How do I run Flex as a service? please give me an example if possible Thanks  Ans: Flex is not a server. It is the pert of your web application. you can use
Flex Updates
Flex Updates  Sir, first Thanks For Good Resource for Every One! i am New to Flex... but,in Current Updates Tell Us Flex Becomes To down!(Sorry To say).. May I know Future groom & Advantage of Flex Over Other Web
Flex basic
Flex basic  Hi.......... I want to know about What is localToGlobal and globalToLocal in flex? please give me ans ASAP..... Thanks
Flex application
Flex application  Hi..... What kind of applications you can create from flex? please give the name of these applications....... Thanks
Flex basic
Flex basic  Hi.... can you tell me about Is Flex OS specific or operating system independent? please give the description about it....... Thanks
Flex basic
Flex basic  Hi.... I want to know Do we need any plugins to run Flex applications? please give the ans ASAP....... Thanks
Flex difference
Flex difference  Hi.... please tell me about What is the difference between Flex 2.0 and Flex 3.0? Thanks  Ans: There are some advantages of Flex3.0 over Flex 2.0 they are following: 1. Faster compilation time
Adding a flex table in another flex table column
Adding a flex table in another flex table column  how to add a flex table in another flex table column
Flex basic
Flex basic  Hi.... Can flex application communicate with each other on the client? please give me the answer ASAP.....ADS_TO_REPLACE_1 Thanks   Ans: See the LocalConnection API In the flex documentation. ADS
Flex with JSP
Flex with JSP  i want to draw chart in jsp page using flex. how can i do that? any solution??   Flex charts You can visit the following links: http://www.roseindia.net/tutorial/flex/flex4/components/charteffect.html
Flex basic
Flex basic  Hi...... Please tell me about What are non-visual components in flex? What class do they extend? please give the name of these components....... Thanks
Adobe flex
Adobe flex  Hi... please give me the description about What is Adobe Flex? Thanks
Flex Managers
Flex Managers  Hi... Please tell me about How to override Managers? give me an example for that.... Thanks
Image in Flex
Image in Flex  Hi..... Can you manipulate images using Flex programs? please give me the example....... Thanks
Flex event
Flex event  hi...... How to capture and event if the component is disabled? please give an example..... Thanks in advance
Metadata in flex
Metadata in flex  Hi......... please tell me about the meta data in flex. Thanks
XML in flex
XML in flex  Hi... just tell me about What is e4X and XML in flex? Thanks
Mask in Flex
Mask in Flex  Hi...... Is it possible to create 'gradient mask' in flex? please give me the ans ASAP..... Thanks in advance
Advantage of Flex
are the Advantages and Disadvantages of flex? Thanks   Advantages: Flex IDE is very capable. Flex output is a movie and images is the major part of this movie. you can not directly download the flex running file. When we right click
Maven Repository/Dependency: wicket | wicket-site-skin
Maven Repository/Dependency of Group ID wicket and Artifact ID wicket-site-skin. Latest version of wicket:wicket-site-skin dependencies. # Version Release Date You can read more
Maven Repository/Dependency: org.gatein.portal.examples.skins | gatein-sample-skin
Maven Repository/Dependency of Group ID org.gatein.portal.examples.skins and Artifact ID gatein-sample-skin. Latest version of org.gatein.portal.examples.skins:gatein-sample-skin dependencies. # Version
Flex event
Flex event  Hi.... please tell me about How does Flex event...: In the capturing phase, Flex examines an event target?s ancestors in the display list to see...: In the targeting phase, Flex invokes the event dispatcher?s listeners. No other nodes
Output of flex
Output of flex  hi....... please provide the name of the output file. What is the output of flex applications? please rply ASAP........ Thanks

Ads