苏飞论坛
标题:
刚才在做Text智能提醒功能.那就分享一下吧
[打印本页]
作者:
幻雪丶逆时光
时间:
2012-12-28 13:58
标题:
刚才在做Text智能提醒功能.那就分享一下吧
本帖最后由 幻雪丶逆时光 于 2012-12-28 14:00 编辑
[code=csharp] private void IntiForm()
{
//初始化智能查询提醒
#region 初始化智能查询提醒
DataTable dt = SqlLink.ExecuteDataTable("SELECT locatePhone FROM wl_v_rylist WHERE ISNULL(locatePhone,'') <> ''");//备注SqlLink 为 SQL连接通用类
AutoCompleteStringCollection acsc = new AutoCompleteStringCollection();
for (int i = 0; i < dt.Rows.Count; i++)
{
acsc.Add(dt.Rows
[0].ToString());
}
this.txtlocPhone.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.txtlocPhone.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
this.txtlocPhone.AutoCompleteCustomSource = acsc;
#endregion
}
[/code]
作者:
剪刀手
时间:
2013-1-3 10:48
主要是Control的AutoCompleteMode和AutoCompleteSource 属性!
作者:
站长苏飞
时间:
2013-1-3 11:12
支持
欢迎光临 苏飞论坛 (http://www.sufeinet.com/)
Powered by Discuz! X3.4