views:

190

answers:

1

I am denying a user the ability to drop into my tree during certain conditions, it's all going well, but I want to tell the user why I'm denying the drop. I would prefer to do it with a toolTip, but it doesn't seem to work. Can I not have a toolTip during a drag operation? How can I force one?

Flex seems to treat toolTips as a property of the UI component, with the component deciding when and if to show it. I would like it to force it to be like doing one in javaScript where it was always just like saying "Show it now" "stop showing it now"

Does anyone know about doing this during drag?

Thanks
~Mike

+2  A: 

What you could try is to show the tooltip yourself with the mx.managers.ToolTipManager. Create for example a VBox that implements mx.controls.ToolTip and displays the message you want to show to the user.

You can see a working example at FlexExamples.

Another idea is to show a programmatic mouse cursor when the drop is denied. I've just read an article about that on Inside Ria.

Thomas
Thanks, I must not have been able to get my search terms right cause I couldn't find that last week. I'll let you know how it goes.
invertedSpear
This looks like it's working, gonna take a while to perfect to my rules, but at least it's functional.
invertedSpear
I'm trying it out myself today because I really like the idea of showing tooltips when something isn't draggable or droppable.
Thomas