Hello,
how can I attach a tooltipp to a ValueListItem in the UltraComboEditor's Items list?
The text should be displayed beside the highlighted item, regardless whether it is highlighted by the mouse or keyboard.
You could use UltraTooltipManager in order to display tooltip whenever and where you want. Specifically for ValueListItem of UltraComboEditor, you could handle DrawValueListItem event of ValueList and based on the e.DrawItemEventArgs.State to display your tooltip. I have implemented this approach in the attached sample.
Please let me know if you have any further questions
thank you Hristo,
exact what I was looking for.
One question:It works only if there is enough place under the Combo.The tooltip is showed always under the Combo, even if the dropdown area is above the Combo.How to handle that situation?
Hi Hristo, hi Maxime,
my question above is not yet answered, that is why I have not marked the solution of Hristo as an answer yet.
The solution works very well. Only in one situation not:If the combo is near to the bottom, the dropdown area is showed above the combo, but the tooltip is showed allways under the combo.How can we handle that situation (what about e.DrawItemEventArgs.Graphics.ClipBounds, are these the measures of the dropdown)? How can we determine in the DrawValueListItem event whether the dropdown is showed under or above the combo?
Thanx
thank you Hristo, it works in both cases well.
UltraToolTipManager tries not to display tooltips off-screen. Either that's a bug, or it's something in your code that's causing this. How are you showing the tooltip? Are you simply assigning the tooltip to the control? Or are you showing it manually using the ShowToolTip method? If the latter, what overload of the method are you using?
Hello ,
The other approach is to use creation filter and to set ITooltipItem for the TextUIElemet of the value list items. Please see attached sample.
I hope that this will helps you.