Title: quote
Tim -

I have it working now with custom components and effects (just like JamJar).  I have it setup now where I can create as many custom tooltips as I want.  It also uses the various errorTipBorderStyles.

This what I did:

1.) I created  my own ToolTip class which extends UIComponent and implements IToolTips.  It has a constructor and empty get/set text methods.

2.) I create my custom component classes which always extend my custom ToolTip class.  I overrride several methods the two most important are  createChildren() and updateDisplayList().  In these methods  I build my components (createChildren) and handle the various styles including the nice  errorTipBorderStyles.

I also have various eventListeners to handle mouse clicks to call  destroyToolTip method.

3.)  I have a custom tooltip manager which extends ToolTipManager.  In this class I have a createCustomToolTip and a destroyToolTip.

The createCustomToolTip is like the createToolTip signature except instead of passing text, I just pass the class reference (in its place) described in step 1.  The problem with createToolTip is it uses ToolTip class in the addChild() call.  So there was no way to override it.  This way any component class which extends my extended ToolTip class will work.

4.) For effects I just do a createInstance passing the ToolTip returned from the createCustomToolTip.

I'm not sure I made this more difficult that it should have been but it is flexible and it works??

Thanks.

.j

Tim Hoff said the following:

Hi John,

Sam's suggestion to use the ToolTipManager's createToolTip and
destroyToolTip methods would allow you to use your custom ToolTip
component. But, since you would manually have to position and
destroy the component anyway, have you considered using a popup
instead?

-TH

--- In [EMAIL PROTECTED]ups.com, John Kirby <[EMAIL PROTECTED]> wrote:
>
> Sam -
>
> Thanks... I've looked at that. The problem is I'm creating custom
> components in my tooltip. So I was trapping the create event to
use my
> own custom tooltip which implements IToolTip. This worked fine.
>
> Where I got stuck was on how to intercept the hide event. Nothing
I
> tried seem to work which would allow the tooltip to continue
showing
> once the mouse was moved off the target. I was trying to recreate
the
> tooltips used in Adobe's JamJar application.
>
> So now my approach is to create my own class which extends
> ToolTipManager. I want added another method (createCustomToolTip)
where
> I pass the custom tooltip class and try to override some methods
so I
> can control when to call destroytooltip?
>
> Not sure this is the best approach?
>
> .j
>
> Samuel Reuben said the following:
> > Hi J,
> >
> > You could look into the documentation for ToolTipManager and use
the
> > methods (createToolTip and destroyToolTip) that are listed there
to
> > achieve what you are trying to do.
> >
> > Hope this helps,
> > -sam
> >
> >
> > On 9/16/06, *josiah_kirby* <[EMAIL PROTECTED]
> > <mailto:jjkirby@...>> wrote:
> >
> > I'm building a custom tooltip (implements IToolTip) which
will have
> > components in it. Once the tooltip is shown I want to keep
it shown
> > until I trigger an event to hide it.
> >
> > I have created a listener on the component for the
tooltipHide to
> > keep
> > it from hiding with no luck.
> >
> > Anyone know how keep a tooltip open until you want to
close/hide it?
> >
> > Thanks.
> >
> > .j
> >
> >
> >
>
> --
> /Whether you think that you can, or that you can't, you are
usually right./
> - Henry Ford
>


--
Whether you think that you can, or that you can't, you are usually right.
 - Henry Ford
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to