2 Replies Latest reply on Jan 11, 2010 3:26 AM by JabbyPandaUA

    Style "errorColor" is not documented for Spark components

    JabbyPandaUA Level 3

      Hi all,

       

      Nor DropDownList neigher TextInput component have this "errorColor" style documented on the list of supported styles

      http://help.adobe.com/en_US/Flex/4.0/langref/spark/components/DropDownList.html#styleSumma ry

      http://help.adobe.com/en_US/Flex/4.0/langref/spark/components/TextInput.html#styleSummary

       

       

      Also Flash Builder 4 does not support "code insight" for  "errorColor" property for those components.

       

      Does that mean, that using "errorColor" style together with Spark components is not advised and editing ErrorSkin skin file is advised instead?

       

      The reason I ask is because the code in SDK around displaying validation highlight border  in UIComponent.as class remains unchanged.

       

        Every time when  UIComponent's "errorString" property is changed, then the border color changes to the color value specified by "errorColor" style, it is also true for Spark components, e.g s:DropDownList or s:TextInput.

        • 1. Re: Style "errorColor" is not documented for Spark components
          Peter deHaan Level 4

          You can set the errorColor style in a CSS block (at least for a Spark TextInput):

           

          <?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">
              <s:layout>
                  <s:VerticalLayout paddingLeft="20" paddingTop="20" />
              </s:layout>
              
              <fx:Style>
                  @namespace s "library://ns.adobe.com/flex/spark";
                  @namespace mx "library://ns.adobe.com/flex/mx";
                  
                  s|TextInput {
                      errorColor: haloOrange;
                  }
                  
                  mx|TextInput {
                      errorColor: haloOrange;
                  }
              </fx:Style>
              
              <s:TextInput id="sTI" text="s:TextInput" errorString="s:TextInput error string" />
              <mx:TextInput id="mxTI" text="mx:TextInput" errorString="mx:TextInput error string" />
              <mx:TextInput id="mxTI2" text="mx:TextInput" errorString="mx:TextInput error string" errorColor="haloBlue" />
              
          </s:Application>
          

           

           

          You may want to file a bug at http://bugs.adobe.com/flex/ and somebody at Adobe can investigate.

           

          Peter