Hello, I created my own validation control.
something like this control.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>
When I validate the txtinput and it's not valid, the textarea will appear with some information in it.
Now I have several textinput fields in a canvas
<custom:control id="eerstes" errormessage("message1");/> <custom:control id="tweeds"errormessage("message2");/>
etc. but when eerstes is not valid, the textarea appears and my custom control with id tweeds will shift a little.
Is it possible to let the textarea float but that is is still relative to hbox1?
Thank you,
JSMB