All the x/y values within your tooltip will be relative to the tooltip itself. Try in your custom tooltip simply setting this.x -= 10; this.y -= 10; on creationComplete or something like that. Actually creationComplete is probably not the best option, the tooltip might be re-used by the manager, try SHOW or something, ADDED_TO_STAGE, perhaps...
-Josh On Wed, Aug 27, 2008 at 8:42 AM, Ethan Miller <[EMAIL PROTECTED]>wrote: > Tried that, and it did use my custom component, but the x/y offset was > still the same... > Also dug around in the bowels of the actual draw routines of the tooltip > border class, but couldn't quite figure out what there was doing the x/y > offset...? The drawRoundRect position values are all between 0 and 4 but > actual tooltips (in their default flex state) usually seem like they're > offset by 20 - 30 px.... > > cheers, ethan > > > TOOL_TIP_SHOW doesn't bubble, so it's probably not the best way. I'd say > simply subclassing ToolTip and setting ToolTipManager.toolTipClass will be > your best bet. > > -Josh > > On Wed, Aug 27, 2008 at 7:57 AM, Ethan Miller <[EMAIL PROTECTED]> > wrote: > >> Example of how to intercept TOOL_TIP_SHOW, please. >> Alternately, all I really want to do is change the horizontal and vertical >> offset of the ToolTIp from the item it describes. Any easy, app-wide way to >> do this? >> >> cheers, ethan >> >> >> >> I think you intercept TOOL_TIP_SHOW and give it a different position. The >> ToolTipMgr should have placed it already where it think it should be. >> >> >> You can set the ToolTipManager.toolTipClass to have all instances of >> tooltips be something else, but you should extend ToolTip in your custom >> ToolTip. >> >> ------------------------------ >> >> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On >> Behalf Of *Ethan Miller >> *Sent:* Tuesday, August 26, 2008 9:59 AM >> *To:* [email protected] >> *Subject:* [flexcoders] Positioning Custom ToolTips >> >> >> Greetings - >> >> Per the Flex documentation, I'm using a custom component as a ToolTip >> by intercepting the toolTipCreate event, as describe below: >> >> "In your application, you can create a custom ToolTip by intercepting >> the toolTipCreate event handler of the target component. In the event >> handler, you instantiate the new ToolTip and set its properties. You >> then point the toolTipproperty of the ToolTipEvent object to the new >> ToolTip." >> >> Unlike using the ToolTip Manager, however, which accepts x,y >> positioning arguments, it's unclear how to position the custom tooltip >> invoked using the intercept and custom class approach.... >> >> So, this leaves me with two questions: >> >> 1. Using a custom class or component created using the incercept >> approach, is there a way to position the tip? >> >> or >> >> 2. Is there way to use a custom class or component for the tip when >> using ToolTip Manager to create them? >> >> Thanks! >> >> ethan >> >> >> >> > > > -- > "Therefore, send not to know For whom the bell tolls. It tolls for thee." > > :: Josh 'G-Funk' McDonald > :: 0437 221 380 :: [EMAIL PROTECTED] > > > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]

