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

problem in catching the keys pressed on combo box

P: n/a
I placed a combobox control on User control and this user control was placed
on a form and I tried to catch the keys pressed on that combo box, but I am
unable to do it. I set the property of keypreview to true.
But when I do the same for text box it is working fine.

After that I placed the combo box control on the form itself and done the
same then also I wasn't able to get the keys pressed on that control. Is
this problem with the combo box control in .NET?
--
Bye For Now,
Chandu.
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The keypress event of the combobox is called but in the scope of the User
control.
I had the same problem, so in my event handler for the keypress event (on
the user control) I
raised another event (my custom event) to which the form was subscribed
to...

One other thing... If you are going to have just one combobox or textbox on
the User control it really doesn't
pay to use it... Make "MyComboBox", which inherits from ComboBox...

saso

"Nagachandra Sekhar Grandhi" <gn*****@hotmail.com> wrote in message
news:O$**************@TK2MSFTNGP09.phx.gbl...
I placed a combobox control on User control and this user control was placed on a form and I tried to catch the keys pressed on that combo box, but I am unable to do it. I set the property of keypreview to true.
But when I do the same for text box it is working fine.

After that I placed the combo box control on the form itself and done the
same then also I wasn't able to get the keys pressed on that control. Is
this problem with the combo box control in .NET?
--
Bye For Now,
Chandu.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.