欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Flex 学习之二十 Form的使用

程序员文章站 2022-07-07 23:14:50
...
<?xml version="1.0" encoding="utf-8"?>
<!-- containers\spark\SparkFormStackedSkinClasses.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
width="300">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
s|Form
{
skinClass: ClassReference("spark.skins.spark.StackedFormSkin");
}
s|FormHeading
{
skinClass: ClassReference("spark.skins.spark.StackedFormHeadingSkin");
}
s|FormItem
{
skinClass: ClassReference("spark.skins.spark.StackedFormItemSkin");
}
</fx:Style>
<s:Form id="frm" width="300">
<!-- Reduce gap between form items. -->
<s:layout>
<s:FormLayout gap="-14"/>
</s:layout>
<s:FormHeading label="STACKED SPARK FORM" backgroundColor="Gray" color="#FFFFFF" width="300"/>
<s:FormItem sequenceLabel="1." label="First name" required="true">
<s:TextInput id="fName" maxChars="64" />
</s:FormItem>
<s:FormItem sequenceLabel="2." label="Last name">
<s:TextInput id="lName" maxChars="64" />
</s:FormItem>
<s:FormItem sequenceLabel="3." label="Address">
<s:TextInput id="AddressLine1" maxChars="32"/>
<s:TextInput id="AddressLine2" maxChars="32"/>
<s:TextInput id="AddressLine3" maxChars="32"/>
</s:FormItem>
<s:FormItem sequenceLabel="4." label="City">
<s:TextInput id="City" maxChars="64" />
</s:FormItem>
<s:FormItem sequenceLabel="5." label="State">
<s:TextInput id="State" maxChars="64" />
</s:FormItem>
<s:FormItem sequenceLabel="6." label="ZipCode" required="true">
<s:TextInput id="ZipCode" maxChars="64" />
</s:FormItem>
</s:Form>
</s:Application>
这个Form中包含有对Form的外观的设置
相关标签: spark Form