Results 1 to 5 of 5

Thread: Combo box - Showing full text in dropdown

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63

    Question Combo box - Showing full text in dropdown

    This is my first post, so hello all. I'm glad I discovered this forum, it been of great help.

    OK, I have a simple VB combo box and the old problem of not being able to see the full text of the dropdown items cos the length of the text is too long.

    I've read in previous posts how to increase the size of the dropdown width, but I was thinking more in the line of Windows explorer and how it shows a tooltips type label if the text doesn't fit within a window.

    So my question is how can I show the full text in a combo box, where the text is longer then the width of the drop down without increasing the width of the dropdown.

    I've seen many standard windows applications using a method of displaying a yellow tooltips style text to show the full text in listboxes, tree views etc, but how can I do this with the standard combo?


  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    You can't. The tooltip text property of the combo box is for the entire combo box, not individual items.

    If you are going to use the standard combo box, go with widening it to fit the longest entry. If that is unacceptable to you, then you would next to investigate purchasing a third party combo box (I've no idea who would make this) that fits your needs.

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63
    Cheers, Hack.

    I thought that would be the case. Unless anyone else can think of any other clever way of doing it.

    How about having a floating Label positioned exactly where a selected item in the dropdown is. That would mean knowing the position of the selected item, but also there is the problem of the label being under the combo dropdown. So I think it would be very difficult.

    In the mean time, I'll extend the dropdown width.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Actually the floating label think does sound cool, and a pain.

    If you ever got something like that to work, post the code. I'm sure lots of folks would be interested.

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63
    Will do, if I get it to work that way.

    Cheers.

Posting Permissions

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



Click Here to Expand Forum to Full Width