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.
Syncfusion Feedback

How to immulate ''Click'' event using Alt+Letter

Thread ID:

Created:

Updated:

Platform:

Replies:

18914 Sep 13,2004 03:37 PM UTC Sep 14,2004 01:37 PM UTC Windows Forms 1
loading
Tags: Tools
Administrator [Syncfusion]
Asked On September 13, 2004 03:37 PM UTC

The Alt-letter causes the BarItem to issue a Selected event. I cannot use the Selected event to handle action activation since it’s issued also when mouse is moved over the item. It appears as if there is no consistant way for both keyboard and mouse to activate a BarItem. Could I force an XPMenus.BarItem to issue a Click event when I use Alt+Letter for a BarItem, directly added to an XPMenus.Bar.

Administrator [Syncfusion]
Replied On September 14, 2004 01:37 PM UTC

Hi MMarinich, You could use the following workaround to force the BarItem to issue a Click event when Alt+Letter is pressed. // Override the host form''s ProcessCmdKey method as shown in code below : protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Alt | Keys.F)) { this.barItem1.PerformClick(); } else if (keyData == (Keys.Alt | Keys.E)) { this.barItem2.PerformClick(); } else if (keyData == (Keys.Alt | Keys.V)) { this.barItem3.PerformClick(); } else if (keyData == (Keys.Alt | Keys.H)) { this.barItem4.PerformClick(); } return base.ProcessCmdKey (ref msg, keyData); } Please refer to the sample attached here that illustrates this and let me know if this works for you. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

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.

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

;