flex4 默认没有控件,点击之后控件出现
<?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" pageTitle="as">
<s:layout>
<s:BasicLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import spark.events.IndexChangeEvent;
import spark.events.TextOperationEvent;
protected function combobox1_changeHandler(event:IndexChangeEvent):void
{
// TODO Auto-generated method stub
}
protected function myText_changeHandler(event:TextOperationEvent):void
{
// TODO Auto-generated method stub
}
]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<fx:XMLList id="myXMLList">
<menuitem id="登记类型">
<menuitum id="自己登记" type="radio" groupName="one"/>
<menuitum id="亲属登记" type="radio" groupName="one"/>
<menuitem id="医生登记" type="radio" groupName="one"/>
</menuitem>
<menuitem id="登记人">
<menuitem id="医生同志" type="radio" groupName="two"/>
<menuitem id="护士大夫" type="radio" groupName="two"/>
<menuitem id="护士大夫" type="radio" groupName="two"/>
</menuitem>
</fx:XMLList>
<fx:Model id="mType">
<root>
<item label="Xml属性绑定" value="xml1"/>
<item label="Xml节点绑定" value="xml2"/>
<item label="XmlList绑定" value="xml3"/>
<item label="Array绑定" value="array"/>
</root>
</fx:Model>
</fx:Declarations>
<s:Panel x="32" y="47" width="715" height="345" enabled="true" title="ert" id="a1">
<s:RadioButton label="show text" click="myText.visible=true; myText.includeInLayout=!myText.visible;" x="184" y="47"/>
<s:RadioButton label="hide text" click="myText.visible=false; myText.includeInLayout=false;" x="262" y="47" enabled="true" selected="false"/>
<s:TextInput id="myText" text="" x="355" y="47" enabled="false" creationComplete="myText.visible = false" />
<s:RadioButton click="bei.visible=true; bei.includeInLayout=!bei.visible; bei.enabled=true; shang.enabled=true" x="184" y="126" label="是" enabled="true" selected="false" groupName="groupName1"/>
<s:RadioButton click="bei.enabled=false; shang.enabled=false" x="262" y="126" label="否" enabled="true" groupName="groupName1" selected="true"/>
<s:RadioButton id="bei" x="355" y="126" label="北京" enabled="false" groupName="groupName2"/>
<s:RadioButton id="shang" x="429" y="126" label="上海" enabled="false" groupName="groupName2"/>
</s:Panel>
</s:Application>