If you follow the component lifecycle, after you addChild the component,
you should be able to use its measuredWidth/Height.  You may have to
call validateClient first, and then you call setActualSize with the
appropriate width/height.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: Thursday, April 17, 2008 6:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Issue with ToolTips not auto sizing

 

Hello All,

I am trying to create ToolTips, add them as Children, and apply the
"errorTip" style to them. I have to do it this way, instead of using
ToolTipManager. When using this method, the Border is extremely small,
and is not aware of the Text width & height.

When you use ToolTipManager, you can pass the "text" parameter right in
the constructor, which probably explains why it comes up at the proper
size immediately (without having to set Width and Height manually).

With that said, how can I use the "errorTip" Style with manually created
ToolTips, and have it come up with the proper Width and Height? I am
trying to avoid having to manually set the Width and Height parameters,
but will be my last resort if necessary.

Since you can't pass the Text property into the Constructor, are there
any ideas on how to do this?

Thanks in advance for any ideas,

Mike

 

Reply via email to