【发布时间】:2009-05-27 12:51:35
【问题描述】:
我创建了自己的验证控件。
类似的东西 控制.mxml:
<mx:states>
<mx:State name="ExceptionState">
<mx:AddChild relativeTo="{hbox1}">
<mx:TextArea id="txtError"
styleName="errorMessage"
width="140" minHeight="26"
wordWrap="true" editable="false"
/>
</mx:AddChild>
<mx:SetProperty name="height" value="56" />
<mx:SetProperty target="{txtInput}" name="y" />
<mx:SetProperty name="width" value="100%" />
</mx:State>
</mx:states>
<mx:HBox width="100%" x="0" y="0" id="hbox1" styleName="nopadding">
<mx:TextInput id="txtInput"
text="{text}"
displayAsPassword="{displayAsPassword}"
maxChars="{maxLength}"
cornerRadius="0"
height="22"
styleName="{inputStyleName}"
width="{_inputWidth}"
/>
</mx:HBox>
当我验证 txtinput 并且它无效时,textarea 会出现,其中包含一些信息。
现在我在画布中有几个文本输入字段
<custom:control id="eerstes" errormessage("message1");/> <custom:control id="tweeds"errormessage("message2");/>
等等。 但是当 eerstes 无效时,会出现 textarea 并且我的带有 id tweeds 的自定义控件会发生一些变化。
是否可以让 textarea 浮动但仍与 hbox1 相关?
谢谢,
JSMB
【问题讨论】:
标签: apache-flex layout textarea