如果文本超出框,如何显示组合框的工具提示 [英] How to show the tool tip for a combobox ,if the text exceeds the box

查看:65
本文介绍了如果文本超出框,如何显示组合框的工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我的应用程序中有组合框,
文本超出了组合框,因此我想显示工具提示,该如何操作
否则,如果有人可以提出更好的方法,请高兴地欢迎.

hi ,
i Have the combo boxes in my application ,
the text is exceeding the combo box , so i have want to show the tool tip for it ,how to do it
or else if any one can suggest the better way please welcome with pleasure.

推荐答案

设置ComboBox的MaxLength属性,它们不能输入太多数据. ..
Set the MaxLength property of the ComboBox and they can''t enter too much data...


OriginalGriff 给出的解决方案1很好. 但是,如果需要允许项目的宽度大于ComboBox的宽度,那么我认为ComboBox 组件中没有内置功能来显示工具提示.因此,作为替代方案,可以使用派生组件,并且以下Code Project文章
带有32位工具提示的Windows.Forms.ComboBox Windows XP(SP2) [带有超级"项目提示的Windows.Forms.ComboBox适用于32位Windows XP(SP2) [ ^ ]
可能会有所帮助.
The Solution 1 given by OriginalGriff is very good.
But, in case if it required to allow width of items more than the width of the ComboBox, then I think there is no built in feature in ComboBox component to show the tool tips. So, as an alternative a derived component may be used and the following Code Project articles
A Windows.Forms.ComboBox with Item ToolTips for 32 bit Windows XP (SP2)[^]
A Windows.Forms.ComboBox with Item ''Super'' ToolTips for 32 bit Windows XP (SP2)[^]
may be helpful.


这篇关于如果文本超出框,如何显示组合框的工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆