电脑故障

位置:IT落伍者 >> 电脑故障 >> 浏览文章

重写ComboBox的OnkeyUp方法


发布日期:2018/6/8
 

using System;

using SystemCollectionsGeneric;

using SystemText;

namespace winform

{

public class OurComBox : SystemWindowsFormsComboBox

{

//==============overwrite ComboBox OnkeyUp method

protected override void OnKeyUp(SystemWindowsFormsKeyEventArgs e)

{

foreach (object item in thisItems)

{

string[] strs = itemToString()Split(ToCharArray());//利用空格来分格字符串

if (strs[]Trim()Equals(thisText))//如果输入的值等于前面的编号

{

thisSelectedItem = item;

thisSelectAll();

}

}

baseOnKeyUp(e);

}

//=================

}

}

上一篇:类库DLL方法属性说明提示的制作方法

下一篇:string和StringBuilder比较