flex4 formitem皮肤
来源:互联网 发布:网络推广主要工作 编辑:程序博客网 时间:2024/05/01 22:17
要想让flex4的表单验证只显示tip方式的错误提示,可以重写FormItem组件,并重写其皮肤。
红色是要修改的地方,皮肤重写如下:
<?xml version="1.0" encoding="utf-8"?>
<!-- TODO
Move the indicator tooltip string to a resource bundle
-->
<!--- The default skin class for the Spark FormItem component.
@see spark.components.FormItem
@langversion 3.0
@playerversion Flash 10
@playerversion AIR 1.5
@productversion Flex 4.5
-->
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
alpha.disabledStates=".5">
<!-- host component -->
<fx:Metadata>
<![CDATA[
/**
* @copy spark.skins.spark.ApplicationSkin#hostComponent
*/
[HostComponent("spark.components.FormItem")]
]]>
</fx:Metadata>
<s:states>
<s:State name="normal" />
<s:State name="disabled" stateGroups="disabledStates"/>
<s:State name="error" stateGroups="errorStates"/>
<s:State name="required" stateGroups="requiredStates"/>
<s:State name="requiredAndDisabled" stateGroups="requiredStates, disabledStates"/>
<s:State name="requiredAndError" stateGroups="requiredStates, errorStates"/>
</s:states>
<s:layout>
<s:FormItemLayout>
<s:constraintColumns>
<!--- The column containing the sequence label. -->
<s:ConstraintColumn id="sequenceCol" />
<!--- The column containing the FormItem's label. -->
<s:ConstraintColumn id="labelCol" />
<!--- The column containing the FormItem's content. -->
<s:ConstraintColumn id="contentCol" width="100%"/>
<!--- The column containing the FormItem's help content. -->
<s:ConstraintColumn id="helpCol" maxWidth="200"/>
</s:constraintColumns>
<s:constraintRows>
<!--- @private -->
<s:ConstraintRow id="row1" baseline="maxAscent:10" height="100%"/>
</s:constraintRows>
</s:FormItemLayout>
</s:layout>
<!--- Defines the appearance of the FormItem's background. -->
<s:Rect id="background" left="0" right="0" top="0" bottom="0">
<s:fill>
<!--- @private -->
<s:SolidColor id="bgFill" color="#FFFFFF"/>
</s:fill>
</s:Rect>
<!--- @copy spark.components.FormItem#sequenceLabelDisplay -->
<s:Label id="sequenceLabelDisplay"
fontWeight="bold"
left="sequenceCol:10" right="sequenceCol:5"
bottom="row1:10" baseline="row1:0"/>
<!--- @copy spark.components.FormItem#labelDisplay -->
<s:Label id="labelDisplay"
fontWeight="bold"
left="labelCol:0" right="labelCol:5"
bottom="row1:10" baseline="row1:0"/>
<!--- @copy spark.components.SkinnableContainer#contentGroup -->
<!--
Don't show the error tip on the content elements
showErrorTip=false 改为 true
-->
<s:Group id="contentGroup" showErrorSkin="true"
left="contentCol:0" right="contentCol:1"
baseline="row1:0" bottom="row1:10" showErrorTip="true">
<s:layout>
<s:VerticalLayout/>
</s:layout>
</s:Group>
<!--
删除提示图标
Don't include the indicator in layout since we position it ourselves
-->
<!--<s:Group x="{contentGroup.x + contentGroup.contentWidth + 4}" y="{contentGroup.y}"
height="{Math.max(indicatorDisplay.height, contentGroup.contentHeight)}" includeInLayout="false">
<!--- @private -->
<!--<s:Image id="indicatorDisplay" verticalCenter="0"
toolTip="Required" toolTip.errorStates=""
includeIn="requiredStates,errorStates"/>-->
<!-- </s:Group>-->
<!--- @copy spark.components.FormItem#helpContentGroup -->
<s:Group id="helpContentGroup" excludeFrom="errorStates"
fontStyle="italic" fontWeight="normal" color="0x666666"
left="helpCol:27" right="helpCol:10"
bottom="row1:10" baseline="row1:0"/>
<!--- @copy spark.components.FormItem#errorTextDisplay -->
<!--
删除追加提示文字
<s:RichText id="errorTextDisplay" includeIn="errorStates"
fontStyle="italic" fontWeight="normal" color="0xFE0000"
left="helpCol:27" right="helpCol:10"
bottom="row1:10" baseline="row1:0"
maxDisplayedLines="-1"/>
-->
</s:Skin>
- flex4 formitem皮肤
- flex4皮肤
- flex4自定义皮肤
- Flex4皮肤制作详解
- Flex4 皮肤设计教程
- flex4 TabBar皮肤
- flex4动态更换皮肤
- flex4皮肤效果
- Flex4 自定义皮肤详解
- Flex4 Skinning 2: 皮肤协议
- Flex4.5 TabBar皮肤修改
- Flex4中的皮肤(1)
- Flex4中的皮肤(2)
- Flex4中的皮肤(3)
- Flex4中的皮肤(4)
- Flex4中的皮肤(5)
- 定制Flex4组件外观皮肤
- FLEX4皮肤1_概述
- 使用VS2008进行双机远程调试
- Deep Learning论文笔记之(一)K-means特征学习
- PAT 1053. Path of Equal Weight (30) (dfs + 路径打印)
- Linux课程_基本命令与工具(一)
- 最牛B的编码套路
- flex4 formitem皮肤
- Java基础加强(二)
- Deep Learning论文笔记之(二)Sparse Filtering稀疏滤波
- Spring Tool Suite中配置maven
- Deep Learning论文笔记之(三)单层非监督学习网络分析
- iOS开发(2)UILabel学习
- FLAPPY BIRD C 语言代码
- Deep Learning论文笔记之(四)CNN卷积神经网络推导和实现
- 数字幅频均衡硬件仿真软件设计