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.
Unfortunately, activation email could not send to your email. Please try again.

capturing up down keypresses in the combodropdown

Thread ID:





9726 Jan 7,2004 12:25 PM Jan 8,2004 11:46 AM Windows Forms 3
Tags: Tools
Asked On January 7, 2004 12:25 PM

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

Administrator [Syncfusion]
Replied On 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

Replied On January 7, 2004 04:50 PM

ProcessDialogKey is never called for directional keys

Administrator [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.