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.
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..
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.
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.
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..
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?
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.
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.