English 中文(简体)
• 如何获得一架德龙德西先令和典型 共同生活的项目
原标题:How to get a Spark DropDownList skinClass and typicalItem to live happily together

如何在不损害典型情况下,在DroopDownList构成部分上打一只皮肤 the。 项目职能

<s:DropDownList id="appList"
  skinClass="skins.IconComboBoxSkin"
  requireSelection="true"
  change="combobox_changeHandler(event)" 
  typicalItem="{appList.selectedItem}">

如果我去除皮肤癌物,那是正确的。

IconCom BoxSkin.mxml

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/ -->
<s:Skin name="CustomDropDownListSkin"
  xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:s="library://ns.adobe.com/flex/spark"
  alpha.disabled="0.5"> 
 <!-- states -->
 <s:states>
  <s:State name="normal" />
  <s:State name="open" />
  <s:State name="disabled" />
 </s:states>

 <!-- host component -->
 <fx:Metadata>
  <![CDATA[ 
  [HostComponent("spark.components.DropDownList")]
  ]]>
 </fx:Metadata> 

 <!--- The PopUpAnchor control that opens the drop-down list. -->
 <s:PopUpAnchor id="popUp"  displayPopUp.normal="false" displayPopUp.open="true" includeIn="open"
       left="0" right="0" top="0" bottom="0" itemDestructionPolicy="auto"
       popUpPosition="below" popUpWidthMatchesAnchorWidth="true">

  <!--- The drop down area of the skin. This includes borders, background colors, scrollers, and filters. -->
  <s:Group id="dropDown" maxHeight="134" minHeight="22" >

   <!-- drop shadow -->
   <s:RectangularDropShadow blurX="20" blurY="20" alpha="1.0" distance="5" 
          angle="90" color="#000000" left="0" top="0" right="0" bottom="0"/>

   <!-- border -->
   <s:Rect left="0" right="0" top="0" bottom="0">
    <s:stroke>
     <s:SolidColorStroke color="0x686868" weight="1"/>
    </s:stroke>
   </s:Rect>

   <!-- fill -->
   <!--- Defines the appearance of drop-down list s background fill. -->
   <s:Rect id="background" left="1" right="1" top="1" bottom="1" >
    <s:fill>
     <!--- The color of the drop down s background fill. The default color is 0xFFFFFF. -->
     <s:SolidColor id="bgFill" color="0xFFFFFF" />
    </s:fill>
   </s:Rect>

   <s:Scroller left="0" top="0" right="0" bottom="0" focusEnabled="false" minViewportInset="1">
    <!--- The container for the data items in the drop-down list. -->
    <s:DataGroup id="dataGroup" itemRenderer="spark.skins.spark.DefaultItemRenderer">
     <s:layout>
      <s:VerticalLayout gap="0" horizontalAlign="contentJustify"/>
     </s:layout>
    </s:DataGroup>
   </s:Scroller>
  </s:Group>
 </s:PopUpAnchor>

 <!--- The anchor button used by the DropDownList. The default skin is DropDownListButtonSkin. -->
 <s:Button id="openButton" left="0" right="0" top="0" bottom="0" focusEnabled="false"
     skinClass="spark.skins.spark.DropDownListButtonSkin" />  

 <s:TextInput id="textInput" 
     left="0" right="18" top="0" bottom="0" 
     skinClass="spark.skins.spark.ComboBoxTextInputSkin"/>

</s:Skin>
问题回答

rewrite measure function in sstart.components.DropDownList





相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Multiple Remote call made simultenously

I was making multiple remote calls and they are done sequentially and when I am getting a result event back it s triggering calls to all the methods with ResultEvent as an argument . I am supposed to ...

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...

热门标签