I googled around a lot for this but could not find a solution anywhere. So I 
decided to solve it on my own by subclassing textinput control and a new style 
called errorskin. I have posted the link if it helps somebody, with view source 
enabled.
http://www.metadesignsolutions.com/samples/flex/errorskin/ErrorSkin.html


--- In [email protected], Toby Tremayne <t...@...> wrote:
>
> Hi Tim,
> 
>       On the text field if I remove the focusSkin yes, it then uses the red  
> border as it should.  But on the combo box and numeric stepper I can  
> confirm that the validation is working fine - when I mouse over the  
> field it still brings up the red tooltip to the right hand side, it's  
> just not giving me the outline on the control itself.  And importantly  
> you can see from the css below that my combo box doesn't even have a  
> focusskin specified.
> 
>       I've discovered that if I use the tab button to move focus onto the  
> combobox after validation has failed, then the focus border appears  
> and is red - but it won't appear by itself.
> 
>       I would have assumed that you could provide a focusskin and then the  
> component would still draw the red border, but I can't find any  
> references for it.  Can anyone tell me how to do this?  There doesn't  
> seem to be a skin option for the error border itself.
> 
> Toby
> On 30/07/2008, at 3:42 PM, Tim Hoff wrote:
> 
> > Hi Toby,
> >
> > For drawing the error border, flex uses the Focus Manager. If you
> > use a focusSkin, it lloks like it over-rides the focus rectangle
> > drawn with the errorColor. Try taking that skin out, to see if it
> > comes back. Don't know about the comboBox. Have you verified that
> > the validation failure is actually setting the errorString? You can
> > try this; to find out if it's a skin or logic problem:
> >
> > <mx:ComboBox errorString="Test"/>
> >
> > -TH
> >
> > --- In [email protected], Toby Tremayne <toby@> wrote:
> > >
> > > Hi all,
> > >
> > > I've googled but every time I find someone with the same
> > problem the
> > > questions seem to go unanswered...
> > >
> > > I have skins applied to a flex app and I'm having an issue
> > where for
> > > most elements the red border doesn't show up when validation
> > fails.
> > > For example, I have this in my css file:
> > >
> > > TextInput
> > > {
> > > borderSkin: Embed(source="TextInput.swf",
> > > symbol="TextInput_borderSkin");
> > > focusSkin: Embed(source="TextInput.swf",
> > symbol="TextInput_focusSkin");
> > > }
> > > ComboBox
> > > {
> > > disabledSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_disabledSkin");
> > > downSkin: Embed(source="ComboBox.swf",
> > symbol="ComboBox_downSkin");
> > > editableDisabledSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_editableDisabledSkin");
> > > editableDownSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_editableDownSkin");
> > > editableOverSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_editableOverSkin");
> > > editableUpSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_editableUpSkin");
> > > overSkin: Embed(source="ComboBox.swf",
> > symbol="ComboBox_overSkin");
> > > upSkin: Embed(source="ComboBox.swf",
> > symbol="ComboBox_upSkin");
> > > }
> > >
> > > And neither combobox nor textinput show the red validation border
> > when
> > > validation fails. What am I missing? Is there a way to specify
> > an
> > > error border skin or something? Or should there be some way in
> > the
> > > skin file to add an error border?
> > >
> > > cheers,
> > > Toby
> > > -----------------------------------
> > >
> > > Life is poetry, write it in your own words
> > >
> > > -----------------------------------
> > >
> > > Toby Tremayne
> > > CEO
> > > Code Poet and Zen Master of the Heavy Sleep
> > > Lyricist Software
> > > 0416 048 090
> > > ICQ: 13107913
> > >
> >
> >
> > 
> 
> -----------------------------------
> 
> Life is poetry, write it in your own words
> 
> -----------------------------------
> 
> Toby Tremayne
> CEO
> Code Poet and Zen Master of the Heavy Sleep
> Lyricist Software
> 0416 048 090
> ICQ: 13107913
>


Reply via email to