首页 > 解决方案 > 在 Windows 窗体应用程序中输入缓慢的问题

问题描述

我正在编写一个带有 ComboBox 的 Windows 窗体应用程序。它是一个带有 SuggestAppend 的 DropDownList。用户键入时,应定位到符合键入字母的项目。如果他们打字相当快,这将按预期工作。如果击键有很短的延迟,它就会开始认为它是一个不同的值。不幸的是,我有很多单指打字员(甚至不是两指),而且他们的打字速度不够快。

这是设计师创建的代码...

this.cbxItemDescription.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbxItemDescription.AutoCompleteSource = sysem.Windows.Forms.AutoCompleteSource.ListItems;
this.cbxItemDescription.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxItemDescription.FormattingEnabled = true;
this.cbxItemDescription.Location = new System.Drawing.Point(75, 2);
this.cbxItemDescription.Name = "cbxItemDescription";
this.cbxItemDescription.Size = new System.Drawing.Size(300, 21);
this.cbxItemDescription.TabIndex = 2;
this.cbxItemDescription.Visible = false;
this.cbxItemDescription.SelectedIndexChanged += new System.EventHandler(this.cbxItemDescription_SelectedIndexChanged);`

它是由线路加载的......

cbxItemDescription.Items.Add(value to be added);

谁能告诉我如何延长间隔以适应这些打字慢的人?

我找到了 WPF ComboBoxes 的答案,但除非我不理解解决方案,否则它们不适用于 Windows 窗体。

标签: winformscombobox

解决方案


推荐阅读