How about a work around:
private function init():void
{
var toolTipString:String = "You need to save your
changes!";
saveTip =
ToolTipManager.createToolTip(toolTipString,50,50) as ToolTip;
saveTip.setStyle("styleName", "errorTipGreen");
var TLM:TextLineMetrics =
saveTip.measureText(saveTip.text);
var paddingLeftPx:int = saveTip.getStyle("paddingLeft")
as int;
var paddingRightPx:int =
saveTip.getStyle("paddingRight") as int;
saveTip.width = TLM.width + 2 * paddingLeftPx + 2 *
paddingRightPx;
}
HTH
Steve
--- In [email protected], "Fotis Chatzinikos"
<[EMAIL PROTECTED]> wrote:
>
> Here you are: (And a screenshot - via mail - have not tried before so
do not
> know if attachment work here...)
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
> creationComplete="init()">
> <mx:Script>
> <![CDATA[
> import mx.managers.ToolTipManager;
> import mx.controls.ToolTip;
>
> private var saveTip:ToolTip = null ;
>
> private function init():void
> {
> saveTip = ToolTipManager.createToolTip("You need to
save
> your changes!",50,50) as ToolTip;
> saveTip.setStyle("styleName", "errorTipGreen");
> }
> ]]>
> </mx:Script>
> <mx:Style>
> .errorTipGreen
> {
> color: #FFFFFF;
> fontSize: 11;
> fontWeight: "bold";
> shadowColor: #000000;
> borderColor: #00FF00;
> borderStyle: "errorTipAbove";
> paddingBottom: 4;
> paddingLeft: 4;
> paddingRight: 4;
> paddingTop: 4;
> }
>
> </mx:Style>
> </mx:Application>
>
>
> On Mon, Dec 8, 2008 at 8:25 PM, Alex Harui [EMAIL PROTECTED] wrote:
>
> > Can you post an entire test case that is as small as possible?
> >
> >
> >
> > *From:* [email protected]
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *Fotis Chatzinikos
> > *Sent:* Monday, December 08, 2008 9:44 AM
> > *To:* [email protected]
> > *Subject:* Re: [flexcoders] errorTip fontSize break the tooltip?
Possible
> > bug?
> >
> >
> >
> > bump :-)
> >
> > Sorry did not get a reply on this... Could somebody test? Alex?
> >
> > On Thu, Dec 4, 2008 at 1:01 PM, fotis.chatzinikos <
> > [EMAIL PROTECTED] wrote:
> >
> > Hi, the following works:
> >
> > .errorTip
> > {
> > color: #FFFFFF;
> > /*fontSize: 11;*/
> > fontWeight: "bold";
> > shadowColor: #000000;
> > borderColor: #0000FF;
> > borderStyle: "errorTipAbove";
> > paddingBottom: 4;
> > paddingLeft: 4;
> > paddingRight: 4;
> > paddingTop: 4;
> > }
> >
> > If I un-comment fontSize, the font gets bigger but the tooltip text
> > gets outside of the tooltips 'area'. Ie text length is 200 pixels
and
> > tooltips area 150 pixels... Is the tooltip's area calculations
> > hardcoded to font size 9?
> >
> > Fotis
> >
> >
> >
> >
> > --
> > Fotis Chatzinikos, Ph.D.
> > Founder,
> > Phinnovation
> > [EMAIL PROTECTED],
> >
> >
> >
>
>
>
> --
> Fotis Chatzinikos, Ph.D.
> Founder,
> Phinnovation
> [EMAIL PROTECTED],
>