Combo box with ability to constraint displayed items. WinForms
Hi I need a combo box control (.NET, WinForms) and to be able to constraint available combo开发者_Go百科 box values by typing a string of characters and have those apply a contains/like search to constrain the available values in the combo box. I mean entering "Un" will show me "United Kingom", "United States"... Can you please advise any existent implementations?
This feature is provided in the System.Windows.Forms.ComboBox. Check out the AutoCompleteMode
To do the things you described, you need to set the Items property of the ComboxBox to have all your options "United Kingdom", "United States", etc. Then, change the AutoCompleteMode to "SuggestAppend". Change the AutoCompleteSource to "ListItems"
精彩评论