Consulting

Results 1 to 7 of 7

Thread: Solved: ToolTip for each item in combobox

  1. #1

    Solved: ToolTip for each item in combobox

    Hi
    I am creating a combobox within an userform. It has list item with string length greater than the width of combobox. So the combobox doesn't show the full text for the list items. So I want to show the tooltip for each list items while the user moves the mouse over the list items.

    Can anyone help me how to do this?

    Thanks in advance

  2. #2
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    Have you tried adjusting the ListWidth property?

    [vba] ComboBox1.ListWidth = "200" [/vba]
    Cheers
    Andy

  3. #3
    Quote Originally Posted by Andy Pope
    Have you tried adjusting the ListWidth property?

    [vba] ComboBox1.ListWidth = "200" [/vba]
    Hi
    I am adding the list items dynamically. And also I have more controls within the userform which is of medium size. So if the width of combobox increases, it may overlap with other controls in the form. So If it display the full value of list item of combobox as Tooltip, it will be good

    Thanks

  4. #4
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    I suggested the ListWidth property not the Width property.

    The listwidth will change the size of the dropdown section of the combobox.
    So yes it may cover other controls on your userform but only whilst the user is trying to select something.
    Cheers
    Andy

  5. #5
    Quote Originally Posted by Andy Pope
    I suggested the ListWidth property not the Width property.

    The listwidth will change the size of the dropdown section of the combobox.
    So yes it may cover other controls on your userform but only whilst the user is trying to select something.

    Hi Andy,
    It solves my problem. Thanks. But for the knowledge I want to know can we show the tooltip for the list items?

  6. #6
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    I don't think you can as the tooltip is not displayed whilst the droplist is showing.
    Cheers
    Andy

  7. #7
    Thanks Andy for your Help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •