/// <summary>
        /// 文字自動完成功能
      /// </summary>
        public void write_complete(TextBox txt_write)
        {
            txt_write.AutoCompleteSource = AutoCompleteSource.CustomSource;
            txt_write.AutoCompleteMode = AutoCompleteMode.Suggest;

     //獲取全部數據 
            DataTable dt_txt=dal_mpu_00material.write_complete(txt_write.Tag.ToString());

            string[] str_txt = new string[dt_txt.Rows.Count];

            for (int i = 0; i < dt_txt.Rows.Count; i++)
            {
                str_txt[i] = dt_txt.Rows[i][0].ToString();
            }
            txt_write.AutoCompleteCustomSource.AddRange(str_txt);
        }

相关文章:

  • 2022-12-23
  • 2021-06-07
  • 2021-11-02
  • 2022-12-23
  • 2022-02-24
猜你喜欢
  • 2022-12-23
  • 2022-02-12
  • 2021-09-29
  • 2021-11-14
  • 2021-11-24
  • 2021-07-11
  • 2022-12-23
相关资源
相似解决方案