I'm a Failure at Creating a Tool Tip for a Flash MX 2004 DataGrid

My situation is this: we have a long title inside a cell in a DataGrid. It's too long for the on-screen area we are working with (The real problem is that the client's product's names are too damn long!). So I said, obviously while smoking crack, "we should add a tool tip to the data grid!"

What the hell was I thinking?!?

I put together an example (oh-my-god-I-did-it-in-as1-on-purpose) to show here as the project code is too complicated to make any sense. This example was created to remove any rogue code elements.

The code I created works fine up to a point. The tool tip appears most of the time. But every now and then a "I" cursor, or edit cursor shows up and a new rollOver event gets fired.

For instance, roll into the area to the right of the price. Looks nice, eh? Now roll your cursor across the "M M M" of the title; you'll see a rapid-fire set of events making the tool tip flicker. Shouldn't there only be one "itemRollOver" event being fired? What the heck is firing off these events and making the cursor change? Is the lable (or whatever is created to put the text into it) firing off a rollOver event?

Does anyone have any furthur insights into this?

Source file (zip: 395K)

Comments (4) | Print | Send | del.icio.us | Digg It! | Linking Blogs
2759 Views

Comments

Patrick Mineault's Gravatar Try to get a hold of the Ehhanced DataGrid in one of the last DRKs, it has that functionality. Costs 99$, will save your marriage.
# Posted By Patrick Mineault | 11/17/05 3:52 PM
Leif's Gravatar And, of course, I only have DRK's 1-8. Wouldn't you know it.
:-(
# Posted By Leif | 11/17/05 4:08 PM
Ryan Matsikas's Gravatar Around line 40 of yer example add: toolTip_tf.selectable = false;

You get that crazy flicker because when you rollOver the MMMM cell its fires itemRollOver, then yer tooltip shows up and covers the area so the DG thinks you've rolled out.. and repeat..

Dunno if that will fix it, but its fixed the obvious problem I saw :)

Hope it helps.
# Posted By Ryan Matsikas | 11/17/05 4:32 PM
Leif's Gravatar If I had not figured that out a mere ten minutes before you posted your comment I would have probably said that you were crazy.

The "solution", which works for the test file and that I am currently testing in our project adds this line after creating the TextField:

toolTip_tf.selectable = false;

The problem we were having *inside* our project was that this was happening when the TextField was elsewhere... more later!
# Posted By Leif | 11/17/05 4:37 PM