ListBox Tooltip

Discussion in 'ASP .Net' started by =?Utf-8?B?Y2Q=?=, Dec 6, 2005.

  1. Is it possible to add a tool tip to an asp .net listbox control utilizing
    javascript or another method? I would like to add a tooltip when the user
    hovers over the item in the listbox. I was seeking a code sample.

    Thank you,
    --
    Christopher
    =?Utf-8?B?Y2Q=?=, Dec 6, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Y2Q=?=

    Guest

    Short answer: Yes.

    The asp:listbox renders as an HTML SELECT element.
    Adding the html attribute "title" to the rendered SELECT will give you
    a tooltip

    for VB
    <listbox>.Attributes.Add("title", "Title goes here")
    - and you don't even need javascript!

    HOWEVER (and this is probably your problem) IE does not implement title
    for the SELECT element.

    If you really, really, realy need to fake it, you can use the
    mouseover/ mouseout events to show/hide a seperate "tooltip" HTML
    element.
    Don't forget the IE windowed controls z-index bug!
    http://support.microsoft.com/default.aspx?scid=kb;en-us;177378

    -- addup --
    , Dec 6, 2005
    #2
    1. Advertising

  3. Thank you for the information.
    --
    Christopher


    "cd" wrote:

    > Is it possible to add a tool tip to an asp .net listbox control utilizing
    > javascript or another method? I would like to add a tooltip when the user
    > hovers over the item in the listbox. I was seeking a code sample.
    >
    > Thank you,
    > --
    > Christopher
    =?Utf-8?B?Y2Q=?=, Dec 6, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ike

    tooltip on listbox item

    Ike, Mar 31, 2006, in forum: Java
    Replies:
    2
    Views:
    2,821
    Monique Y. Mudama
    Mar 31, 2006
  2. Radu
    Replies:
    1
    Views:
    531
    Bruce Barker
    Jan 8, 2007
  3. Tooltip in Listbox

    , Jan 19, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    501
  4. tshad

    Listbox and tooltip

    tshad, Oct 7, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    474
    tshad
    Oct 7, 2008
  5. Microsoft

    Tooltip for listbox and combobox

    Microsoft, Jul 1, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    112
    Microsoft
    Jul 1, 2005
Loading...

Share This Page