John,

Searched through the docs and it doesn't quite answer my question. So
I have a descendant of ITooltip that is a more complex toolTip with
multiple pieces of information on it. I only want this complex tooltip
to show up for certain types of objects, others I want the standard
tooltip to show up. These objects get created and placed dynamically.
I'll check the createToolTip event and see if that will override the
standard event but the examples I saw so far all created this
functionality using MXML which works great. I'd rather use the toolTip
functionality than try to override everything on a rollover, rollout
command.


Rich

--- In [email protected], John Kirby <[EMAIL PROTECTED]> wrote:
>
> Rich -
> 
> There is a good example in the Flex docs under "Using the ToolTip
Manager"
> 
> Basically you create an listener on the UIControl which catches the 
> toolTipShow event and fires a callback method.  Do what you need to do 
> in the call back
> 
> <mx:button id="myButton" toolTip= "some default text" />
> 
> myButton.addEventListener("toolTipShow", myCallBack)
> 
> private function myCallBack(event:ToolTipEvent):void{
> 
> ToolTipManager.currentToolTip.text = "some custom text";
> 
> // Do some more custom stuff
> 
> 
> }
> 
> This will display "some custom text" when you hover over the button.
> 
> You can take this even further by using the 
> ToolTipManager.createToolTip() to really enhance the tip with fonts, 
> styles, etc.
> 
> There are examples of this in the Using the ToolTip Manager.
> 
> If you want to add components to your tooltip... let me know.  I have 
> created some classes which extend toolTip so you can add panels, 
> TitleWindows, etc to your tooltip.
> 
> .j
> 
> richmcgillicuddy said the following:
> >
> > I've looked at the various ways to create custom tooltips and they
> > work great if the custom tooltip is defined in the MXML code with a
> > format similar to:
> > toolTip=" " toolTipCreate="event.toolTip=this.createTip()"
> >
> > If I create an UIComponent via Actionscript and want to
> > use the custom toolTip, how would I do this? How do I associate the
> > toolTipCreate event in ActionScript?
> >
> > var myLabel : Label;
> > myLabel.toolTipCreate = ????
> >
> > Any help would be greatly appreciated.
> >
> > Rich
> >
> >  
> 
> -- 
> /Whether you think that you can, or that you can't, you are usually
right./
>  - Henry Ford
>



Reply via email to