hey hey...

just want to know, if theres some kind of way to prohibit the user from entering data into a combobox...

i dont want to use a list box... to must space taken, and no point in disabling it... as then i cant select an item...

please help
thanx in advanced

A ComboBox comes in three flavours.
You just got to set the DropDownStyle property.
DropDownStyle = ComboBoxStyle.Simple; This acts as a simple list(not what you want)
DropDownStyle = ComboBoxStyle.DropDown; This is what you want, you can't edit.
DropDownStyle = ComboBoxStyle.DropDownList; A list, and you can edit text.
Hope this helps.

Comments
solved~!

weird thing is, its already set on that... yet i can still edit... :/

Edited 7 Years Ago by phoenix911: nooob mistake

A ComboBox comes in three flavours.
You just got to set the DropDownStyle property.
DropDownStyle = ComboBoxStyle.Simple; This acts as a simple list(not what you want)
DropDownStyle = ComboBoxStyle.DropDown; This is what you want, you can't edit.
DropDownStyle = ComboBoxStyle.DropDownList; A list, and you can edit text.
Hope this helps.

as i played with this property... i noticed something... either u made a small mistake ( i dont mind, as it got me closer to solving the prob) or my VS is screwed... anyway...

DropDownStyle = ComboBoxStyle.Simple; This acts as a simple list(not what you want)
DropDownStyle = ComboBoxStyle.DropDown; This is what i dont want, you can edit it.
DropDownStyle = ComboBoxStyle.DropDownList; A list, and you cant edit text, which i want

thanx much appreciated...

DropDownStyle = ComboBoxStyle.DropDownList;

using the above 1, sorted my problem.
thanx

Edited 7 Years Ago by phoenix911: n/a

This question has already been answered. Start a new discussion instead.