If you've ever wondered how to make the contents of a combo box read-only, you've probably already noticed that there is no 'read-only' property to set True/False.
After connecting some combo boxes to some fields in a database, I noticed that you could still type over stuff that came through. It didn't really do any harm. (It didn't really do anything to it at all.) However, it could prove to be a bit confusing to application users.
Thankfully, there is a quick and easy way to make the combo box read-only, without inserting any code.
Under the 'DropDownStyle' property, switch it to 'DropDownList'. instead of the default. Your combobox will now be a read-only list oriented drop down box.
No comments:
Post a Comment