/// <summary> /// Create an AutoCompleteCellEditor /// </summary> /// <param name="lv"></param> /// <param name="column"></param> public AutoCompleteCellEditor(ObjectListView lv, OLVColumn column) { this.DropDownStyle = ComboBoxStyle.DropDown; Dictionary<String, bool> alreadySeen = new Dictionary<string, bool>(); for (int i = 0; i < Math.Min(lv.GetItemCount(), 1000); i++) { String str = column.GetStringValue(lv.GetModelObject(i)); if (!alreadySeen.ContainsKey(str)) { this.Items.Add(str); alreadySeen[str] = true; } } this.Sorted = true; this.AutoCompleteSource = AutoCompleteSource.ListItems; this.AutoCompleteMode = AutoCompleteMode.Append; }