Readonly ComboBox in WinForms

Brock Greman picture Brock Greman · Oct 2, 2008 · Viewed 28.4k times · Source

I'm writing a GUI in C#, Visual Studio 2008, using the Designer and WinForms. I've got a ComboBox control, and I'd like it to only allow to select from the provided options and not to accept a user-entered string. It doesn't appear to have a ReadOnly property, and disabling it hinders the readability of the control (as well as disallowing user-selection).

Answer

Phillip Wells picture Phillip Wells · Oct 2, 2008

Set DropDownStyle to "DropDownList"