Disable selection of ComboBox text

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Is there a way to set the text box portion of a ComboBox to read only? I do
not want the user to select or delete the text in the combo box. I also
don't want to disable the combobox because I still want to use it and I
don't want the text color to change. Thanks!
 
It should not be too hard to implement something like that. Capture the
Key* events and do nothing with them. Same with the Click event. No you
have a control that looks like a combobox but does not allow changes.

HTH

David
 
Hello Bob,

Thanks for your post. As I understand, you want to prevent a user from
directly editing the text portion of ComboBox.

If so, please set the DropDownStyle of the ComboBox to DropDownList.

Please let me know if this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top