3 Replies Latest reply on Jun 19, 2011 12:46 PM by drkstr_1

    styleName and <s:span>

    Maxime Chupin Level 1

      Hi,

       

      I am trying ta apply a style to a span content. But I do not understand why this does not work:

       

      <?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"
                     >

       

        <fx:Style source="style.css"/>   
       
        <s:RichEditableText id="code2" editable="false">
          <s:textFlow>
            <s:TextFlow>
          <s:span styleName="boldSpan">
            Coucou
          </s:span>
            </s:TextFlow>
          </s:textFlow>
        </s:RichEditableText>

       

      </s:Application>

       

      with this style.css

       

      @namespace s "library://ns.adobe.com/flex/spark";
      @namespace mx "library://ns.adobe.com/flex/mx";

       

      .boldSpan {
          fontWeight: bold;
      }

       

      Any ideas?

       

      Thanks