WinForms ComboBox问题 [英] WinForms ComboBox problem

查看:67
本文介绍了WinForms ComboBox问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows窗体应用程序中,我有一个ComboBox1,该ComboBox1在InitializeComponent()函数中初始化。我将值添加到其他函数中。

In a Windows Form Application, I have a ComboBox1 which gets initialized in InitializeComponent() function. I add the values into it in a different function.

片段:

    public form1()
    {
        InitializeComponent();
        addDataToDropDowns();
    }

我的问题是,加载到ComboBox1中的行有很多字符(/长度)并且不会在宽度方向上完全看到。

The problem I have is that, the rows loaded into the ComboBox1 have many characters(/length) and are not to be seen completely width wise.

是否可以在ComboBox1中内置水平滚动条,以便我可以看到其中的隐藏部分该行也... ??

Is it possible to have a horizontal scrollbar built into the ComboBox1 so that I can see the hidden part of the row too...??

任何想法/建议都会受到赞赏!

Any ideas/inputs will be appreciated!

谢谢,
Ivar

Thanks, Ivar

推荐答案

http://www.codeproject.com/KB/combobox/ComboBoxAutoWidth.aspx

该代码示例显示了如何捕获事件并扩大事件范围。

That has code sample that shows how to capture the event and widen the box.

或,您可以将其作为单独的函数手动调用,例如:
http://weblogs.asp.net/eporter/存档/2004/09/27/234773.aspx

OR, you could have it as a seperate function you manually call, like this: http://weblogs.asp.net/eporter/archive/2004/09/27/234773.aspx

这篇关于WinForms ComboBox问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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