问题描述
谢谢!
解决方案
解决方案二:
1.usingSystem;2.usingSystem.Collections.Generic;3.usingSystem.ComponentModel;4.usingSystem.Data;5.usingSystem.Drawing;6.usingSystem.Text;7.usingSystem.Windows.Forms;8.usingSystem.Data.Common;9.10.namespace文本框联想功能的实现11.{12.publicpartialclassForm1:Form13.{14.DataTabledt=newDataTable();15.publicForm1()16.{17.InitializeComponent();18.}19.20.privatevoidForm1_Load(objectsender,EventArgse)21.{22.InitialAutoCompleteList();23.}24.25.privatevoidInitialAutoCompleteList()26.{27.string[]array=newstring[]{"hello","hi","nihao","hehe","yes","no","nobody","morning","yellow","moon"};28.DataColumndc=newDataColumn("name");29.this.dt.Columns.Add(dc);30.for(inti=0;i<10;i++)31.{32.DataRowdr=dt.NewRow();33.dr[0]=array[i];34.dt.Rows.Add(dr);35.}36.AutoCompleteStringCollectionAutoCollection=newAutoCompleteStringCollection();37.foreach(DataRowdrindt.Rows)38.{39.AutoCollection.Add(dr["name"].ToString());40.}41.this.textBox_TestAutoComplete.AutoCompleteCustomSource=AutoCollection;42.this.comboBox_TestAutoComplete.AutoCompleteCustomSource=AutoCollection;43.}44.}45.}
解决方案三:
但是不能显示汉字,怎么做?
解决方案四:
就是输入汉字首字母,动态已对应显示汉字
解决方案五:
你想做输入法?
解决方案六:
解决方案七:
这不就是输入法么?要不就把汉字的首字母存起来,然后读取的时候查首字母然后显示汉字