2 Replies Latest reply on May 6, 2009 2:20 AM by swallow_1

    Reg. CSS

    swallow_1

      Hi all,

       

      Is there any way to  declare or define more than 1 CSS reference ( textbox , toolTip )  for the same component like the below one.

       

       

      <mx:TextInput                                                       id ="tbx1"                           styleName="textbox, toolTip"                           toolTip="Enter User"         />

       

       

      my CSS file content:

       

      .textbox{

       

      borderStyle:solid;

      borderColor:#7f9db9;

      color:#173553;

      fontSize: 11;

      background-disabled-color: #f5f5f1;

      }

       

      .toolTip{

      backgroundColor: #fafae6;

      }

       

      I want to make both the tool tip and text input kept separately in the CSS file

      If  so please suggest me.

      Thanks  a lot.

      selva

        • 1. Re: Reg. CSS
          _Natasha_ Level 4

          Hi Selva,

          it's possible if you create your own component and override logic about styles. But it's usual even for html.

          I think it's easier to create classes and inherit styles.

          • 2. Re: Reg. CSS
            swallow_1 Level 1

            Hi natasha,

             

               Thanks for ur reply.

             

               The question is I have two CSS stylenames declared in my CSS file :

             

             

              my CSS file content:

             

            .textbox{

             

            borderStyle:solid;

            borderColor:#7f9db9;

            color:#173553;

            fontSize: 11;

            background-disabled-color: #f5f5f1;

            }

             

             

            .toolTip{

            backgroundColor: #fafae6;

            }

             

             

            The thing is I want to refer these two stylenames in my MXML Text Input control.

             

            <mx:TextInput  id ="tbx1" styleName="textbox"  toolTip="Enter User"  />

             

            At present i can able to point only one styleName="textbox" in my control.

             

            My question is I also want to point the stylename .toolTip with the background color changed in my MXML Text Input control. which is defined in the CSS file.

             

            So can we able to refer more than one style names defined in the CSS file in my MXML controls.

             

            Im Sorry and new to Flex.

             

            Please assist me.

             

            Thanx a lot.

             

            Selva.