views:

309

answers:

2

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.

A: 

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.

Robusto
Thanks for responding Robusto. Not quote, but it gave me the idea that solved the problem.
touB
A: 

I was working on a separate mxml component. It turned out that for whatever reason the style wouldn't take when placed in the component itself. They worked when placed in the main application. Not sure why, but moving them fixed it. If anyone has a clarification, would be nice to know.

touB