By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,799 Members | 1,334 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,799 IT Pros & Developers. It's quick & easy.

How to make a ComboBox ReadOnly?

P: n/a
I want to have a ComboBox that is loaded programmically not except keyboard
inputs.

I tried in KeyDown not calling MyBase.OnKeyDown(e)
and also tried setting e.Handled = True but neither appear to suppress the
keyboard input.
Any suggestions I could try will be appreciated

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
By readonly I mean, I don't want the user adding text in the textbox. The
values in the DropDown are the only allowed values.

For example the dropDown values might be the US state names, and one of
these must be selected - no other values allowed.
Thanks

" **Developer**" <RE*************@a-znet.com> wrote in message
news:u$**************@TK2MSFTNGP10.phx.gbl...
I want to have a ComboBox that is loaded programmically not except keyboard
inputs.

I tried in KeyDown not calling MyBase.OnKeyDown(e)
and also tried setting e.Handled = True but neither appear to suppress the
keyboard input.
Any suggestions I could try will be appreciated

Nov 21 '05 #2

P: n/a
Developer,

You can set the combobox's DropDownStyle property to DropDownList to have
the combobox behave like a dropdown listbox.

Kerry Moorman
"**Developer**" wrote:
By readonly I mean, I don't want the user adding text in the textbox. The
values in the DropDown are the only allowed values.

For example the dropDown values might be the US state names, and one of
these must be selected - no other values allowed.
Thanks

" **Developer**" <RE*************@a-znet.com> wrote in message
news:u$**************@TK2MSFTNGP10.phx.gbl...
I want to have a ComboBox that is loaded programmically not except keyboard
inputs.

I tried in KeyDown not calling MyBase.OnKeyDown(e)
and also tried setting e.Handled = True but neither appear to suppress the
keyboard input.
Any suggestions I could try will be appreciated


Nov 21 '05 #3

P: n/a
I did check the style an even tried something - I don't remember the name of
the style- but it wasn't OK. I must have missed DropDownList.

Thanks for the help!

"Kerry Moorman" <Ke**********@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Developer,

You can set the combobox's DropDownStyle property to DropDownList to have
the combobox behave like a dropdown listbox.

Kerry Moorman
"**Developer**" wrote:
By readonly I mean, I don't want the user adding text in the textbox. The
values in the DropDown are the only allowed values.

For example the dropDown values might be the US state names, and one of
these must be selected - no other values allowed.
Thanks

" **Developer**" <RE*************@a-znet.com> wrote in message
news:u$**************@TK2MSFTNGP10.phx.gbl...
>I want to have a ComboBox that is loaded programmically not except
>keyboard
>inputs.
>
> I tried in KeyDown not calling MyBase.OnKeyDown(e)
> and also tried setting e.Handled = True but neither appear to suppress
> the
> keyboard input.
>
>
> Any suggestions I could try will be appreciated
>
>
>


Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.