Home All Groups Group Topic Archive Search About

Anyway to enable a ToolTip for each ListItem

Author
22 Jun 2006 6:06 PM
Chris Bates
Is there anyway to enable a tooltip for each item in a listbox ?

Author
23 Jun 2006 6:57 AM
Alessandro Zifiglio
hi Chris, cant be done, this is a limitation of the option element itself.
It does not support a title attribute. You will need to resort to javascript
again and use the onmouseover event of the select element and check the
event.RelatedTarget for non IE browsers and window.event.toElement for IE
only, to check on what item of the select element you moused over and take
action by setting the title of the select element  based on what option item
you have moused on.
Its cake, depending on how knowledgable you are with javascript.
good luck,
Alessandro Zifiglio
Show quoteHide quote
"Chris Bates" <ChrisBa***@discussions.microsoft.com> ha scritto nel
messaggio news:7FB92031-97BC-4AA8-BCDC-6D7A1A3BFC21@microsoft.com...
> Is there anyway to enable a tooltip for each item in a listbox ?
Author
23 Jun 2006 7:17 AM
Alessandro Zifiglio
Also, now that i think about it a bit longer, setting the title of the
select element might not be convenient and work the way you want it. You are
looking at creating a custom tooltip, eg. An absolutely positioned div
element, whose contents are the title that you want to set when the
onmouseover of the select element fires.
Regards,
Alessandro Zifiglio
Show quoteHide quote
"Alessandro Zifiglio" <AlessandroZifiglio @ -h-o-t-m-a-i-l-c-o-m> ha scritto
nel messaggio news:%23WtMCJplGHA.4868@TK2MSFTNGP04.phx.gbl...
> hi Chris, cant be done, this is a limitation of the option element itself.
> It does not support a title attribute. You will need to resort to
> javascript again and use the onmouseover event of the select element and
> check the event.RelatedTarget for non IE browsers and
> window.event.toElement for IE only, to check on what item of the select
> element you moused over and take action by setting the title of the select
> element  based on what option item you have moused on.
> Its cake, depending on how knowledgable you are with javascript.
> good luck,
> Alessandro Zifiglio
> "Chris Bates" <ChrisBa***@discussions.microsoft.com> ha scritto nel
> messaggio news:7FB92031-97BC-4AA8-BCDC-6D7A1A3BFC21@microsoft.com...
>> Is there anyway to enable a tooltip for each item in a listbox ?
>
>