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

capturing up down keypresses in the combodropdown

Thread ID:





9726 Jan 7,2004 05:25 PM UTC Jan 8,2004 04:46 PM UTC WinForms 3
Tags: Tools
Asked On January 7, 2004 05:25 PM UTC

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

Administrator [Syncfusion]
Replied On January 7, 2004 07:55 PM UTC

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 09:50 PM UTC

ProcessDialogKey is never called for directional keys

Administrator [Syncfusion]
Replied On January 8, 2004 04:46 PM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon