Search code examples
apache-flexadobemxmltooltip

Flex, can't custom style the tooltip


I'm having trouble changing the font size of my TextInput tooltip. The text input looks like this:

<s:TextInput id="first"
             toolTip="Hello"/>

then I create a style like this:

 <fx:Style>
  @namespace s "library://ns.adobe.com/flex/spark";
  @namespace mx "library://ns.adobe.com/flex/halo";

  mx|ToolTip {
   fontSize: 24;
  }
 </fx:Style>

but absolutely nothing happens. Any idea what I may be doing wrong?

P.S. I also get a yellow warning: "CSS type selectors are not supported in components: 'mx.controls.ToolTip'" but it still compiles since it's just a warning, but nothing happens.


Solution

  • In Flex 3.x the CSS selector

    ToolTip {
      font-size: 24;    
    }
    

    works fine. Try yours without the namespace prefix just to see if it works at all. If it does, there may be something wrong with your namespace URI.