示例#1
0
        private void AutoCompleteState()
        {
            AutoCompleteStringCollection AutoItem = new AutoCompleteStringCollection();

            foreach (String v in States.Abbreviations())
            {
                AutoItem.Add((v));
                stateTxt.Items.Add(v);
            }
            stateTxt.AutoCompleteMode         = AutoCompleteMode.Suggest;
            stateTxt.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            stateTxt.AutoCompleteCustomSource = AutoItem;
        }