Avoid default tooltip display of tree labels

15 views
Skip to first unread message

AHL

unread,
Aug 1, 2009, 5:20:58 AM8/1/09
to Flex India Community
Hi,
I am displaying some labels in a tree. The tree width is fixed, so I
am using truncateToFit method of labels in the item renderer. Since I
am keeping the width of tree fixed, the labels are displayed with
default tool tips. However, I have already written a tool tip handler,
which positions the tool tip displayed. Now the problem is, default
tool tip is also displayed, which actually does not allow the tooltip
event handler to execute i.e. it overrides the positioned tooltip. I
want a way to hide the default tooltip and instead let only my event
handler for tooltip display the tooltip

sandeepmalik

unread,
Aug 2, 2009, 2:09:01 AM8/2/09
to Flex India Community
How are you displaying your tool tip? You should listen for
toolTipCreate event and then create your text there, in that case the
default tooltip should not come, second thing is override the
updateDisplayList() of Label class (used as itemRenderer) in your
case, and make a call to super.updateDisplayList() and after that set
the toolTip to null there.

-Sandeep

shubhra

unread,
Aug 2, 2009, 6:32:03 AM8/2/09
to Flex India Community
Hi,

Do this....
Put yr tooltip function in this code statement and then the default
behavior will be overridden

tree.showDataTips = true;
tree.dataTipFunction = myToolTipFunactionName;

Regards,
Shubhra

Amol Lekurwale

unread,
Aug 3, 2009, 5:09:50 AM8/3/09
to flex_...@googlegroups.com
Thanks Shubhra. It works well.

anil varaha

unread,
May 22, 2012, 5:08:50 AM5/22/12
to flex_...@googlegroups.com
Hi AHL/Shubhra,

My requirement is to show a mouse hover in tree..
for which i am using data tip function.
but it is not working.
Can you pls help me with this..

Thanks in advance.
 
Reply all
Reply to author
Forward
0 new messages