Results 1 to 12 of 12

Thread: Setthing Tooltip for Combobox Items

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    73

    Setthing Tooltip for Combobox Items

    How do I set tooltip value for each combo box items such that the tooltip displays when I scroll down the list and highlight any item. I can make it to show the tooltip only for the selected item after I click but now when I mouse over or highlight. Any ideas.

    Thank you,

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    i don't believe that items in a combobox have tooltiptext properties... since the items themselves are not objects... the control itself is an object.. the items in the drop down are just text..

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    No.

    Combo box controls do not have any type of Mouse event. There is no MouseMove, MouseUp, MouseDown, etc. If you switched to a Listbox, they do have Mouse controls, but you still couldn't show individual tooltips for individual items unless you wrote individual tooltips back to a Db table, and read them everytime the mouse moved to a new it.

    This is, however, impractical. Thats way too many Db reads, and if you Db is on a network server, the traffic would go monsterous.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    73
    Exactly Kleinma. For the combo box itself, it works after the item is selected. However, is there any api or other ways how you could get the combo items to behave similarly. I am using an api call for the listbox using mouse_move event, but no such event is available in Combo Box. My items text in combo box may be long and I do not want the combo box to be as long as the text, therefore, I thought tooltiptext might be helpful, if there is a way to do it not sacrificing what Hack has posted.

    Thank you,

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    ummm well i guess instead of doing database reads you could load the tooltips into variables or an array or something like that when you load the actual box.. but that doesn't change the fact that there are no event (like hack said) to determine when the mouse is over a specific item... maybe the list box would be a better bet?

    attached is a little app i wrote for someone on here when i was bored.. maybe u could mess around with that... it makes a form simulate as a tooltip.. because the person i actually made it for wanted a tooltip that would change its message while over the same item.. which the tool tip doesn do... anyway.. maybe you could mess around with it and get it to help a little.. even if you dont get exactly what you are after..
    Attached Files Attached Files

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Would it be practical for you to extend the length of the combo box, at run time, to the length of the longest item, whatever that item may be, now or in the future?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    73
    No, extending combo box to the max length of the item would not be practical in my case. I cannot use listbox because listbox does not have a drop down feature. List box shows all the items in one view.

    But, I am going to look at what Kleinma has done.

    Thanks

  8. #8
    Fanatic Member
    Join Date
    Jun 2003
    Location
    IL
    Posts
    739
    h20168-

    I know this was posted a very long time ago, but worth a shot. Did you ever figure out a way of doing this? I have the same exact problem. If you did not find a solution could you please let me know anyway so that I am not here waiting .

    Thanks!
    Maldrid
    Motto: Anything for a laugh.

    Getting second place only means you are the first loser to cross the finish line.

  9. #9
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Hack f*****g hell, how come you have such a huge post count!

  10. #10
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    you wont get an answer from him since he has since left the forums over a year ago...

  11. #11
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Ooops, didnt realise this post was a year old

    Geeeez, he must of been a heavy poster

  12. #12

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