We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

capturing up down keypresses in the combodropdown

what is the proper way to catch up & down keypress for the combodropdown TIA, Peter

3 Replies

AD Administrator Syncfusion Team January 7, 2004 02:55 PM

Hi Peter You will have to derive from ComboDropDown control and override the ProcessDialogKey in your derived control to catch the Up and Down keys. Regards Arun


PE Peter January 7, 2004 04:50 PM

ProcessDialogKey is never called for directional keys


AD Administrator Syncfusion Team January 8, 2004 11:46 AM

Hi Peter Yes, that seems to be the case. Sorry. You need to override ProcessCmdKey instead. Here is a derived ComboDropDown that does what you are looking for: public class MyComboDropDown : Syncfusion.Windows.Forms.Tools.ComboDropDown { protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData==Keys.Left ||keyData==Keys.Right || keyData==Keys.Up || keyData==Keys.Down) { MessageBox.Show("Arrow Key: " + keyData.ToString(),"MyComboDropDown"); } return base.ProcessCmdKey (ref msg, keyData); } } Regards Arun

Loader.
Live Chat Icon For mobile
Up arrow icon