开发者

Autocompletion in c# DevExpress TextEdit

开发者 https://www.devze.com 2023-01-18 01:19 出处:网络
I am using devexpress TextEdit in c#.net application and i want to implement auto completion for TextEdit.My doubt is that for normal TextBox we set AutoC开发者_开发技巧ompletion mode property.But in

I am using devexpress TextEdit in c#.net application and i want to implement auto completion for TextEdit.My doubt is that for normal TextBox we set AutoC开发者_开发技巧ompletion mode property.But in devexpress TextEdit how we can ?

Please Help


In fact you can easily do it :

var tx = TextEditMoveTo.MaskBox;

AutoCompleteStringCollection customSource = new AutoCompleteStringCollection();
customSource.Add("Yes");
customSource.Add("You");
customSource.Add("Can");

tx.AutoCompleteSource = AutoCompleteSource.CustomSource;
tx.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
tx.AutoCompleteCustomSource = customSource;

And it works like a charm :)

You can read more about it here.

Credits goes to Uwe Keim


You don't specify for what you need autocomplete, but I think you have to use MRUEdit instead of TextBox.

0

精彩评论

暂无评论...
验证码 换一张
取 消