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

Using the keyboard to access menus...

Thread ID:

Created:

Updated:

Platform:

Replies:

19784 Oct 4,2004 03:14 PM UTC Oct 13,2004 01:11 PM UTC Windows Forms 8
loading
Tags: Tools
Nik Vale
Asked On October 4, 2004 03:14 PM UTC

I would like to be able to access my main menu in traditional windows style, i.e. Alt-F will open the File menu... However, there is a problem in my MDI application where the child window contains an XPToolbar. I have attached a sample application, the problem can be reproduced by following these steps... 1. Run the application. 2. Notice that with no child form ALT-F works as expected. 3. Select File->New. 4. Notice that ALT-F no longer works. It seems like the ALT-F is being caught by the "Fix" item on the XPToolbar. Any suggestions? Thanks in advance, Nik

Administrator [Syncfusion]
Replied On October 4, 2004 08:06 PM UTC

Hi Nik, Thanks for bringing this to our attention and also for the sample. After further investigating this issue, I believe the XPToolBar has nothing to do with this issue. The issue here is, the BarItems do not respond to access keys after merging occurs. We are looking into this, and I will keep you posted on the developments. We appreciate your feedback. Regards, Guru Patwal Syncfusion, Inc.

Nik Vale
Replied On October 5, 2004 02:52 PM UTC

Guru, Thanks for your reply. However, I am not convinced that the XPToolbar is innocent. When I remove the XPToolbar from the example I sent you ALT-F works as expected. Nik

Administrator [Syncfusion]
Replied On October 6, 2004 01:58 AM UTC

Hi Nik, Thanks for the update. On further investigating this issue, it seems to be a bug in the .NET framework v1.1 , since this works fine in .NET framework v1.0. In the v1.1 .NET framework, the ProcessMnemonic is not being sent to the parent form automatically, so we would have to forward it to the parent form manually. Please refer to the ChildForm’s ProcessMnemonic override and the ProcessMnemonic_New method in Form1. protected override bool ProcessMnemonic(char charCode) { // In the 1.1 framework, the ProcessMnemonic is not being sent to the parent form, so // forward it to the parent form manually. bool retVal = base.ProcessMnemonic(charCode); if(retVal == false) { return ((Form1)this.MdiParent).ProcessMnemonic_New(charCode); } else return true; } // Call this from the child form''s ProcessMnemonic override public bool ProcessMnemonic_New(char charCode) { return base.ProcessMnemonic(charCode); } Please refer to the complete sample that illustrates this workaround. Let me know if this works for you. Regards, Guru Patwal Syncfusion, Inc.

Nik Vale
Replied On October 6, 2004 05:41 PM UTC

Guru, Thanks for suggestion. However, I am still experiencing some problems. It appears that this fix does indeed re-enable the ALT-F functionality as expected - however I put a break point in ProcessMnemonic() and it never gets hit when using ALT-F. The biggest problem is that if I hit a different key combination, such as ALT-X, then I get a StackOverflowException. Nik. PS. I still believe that it has something to do with the Fix BarItem on the XPToolBar, if the BarItem''s text is changed from "&Fix" to "Fix" then Alt-F works correctly.

Administrator [Syncfusion]
Replied On October 8, 2004 02:19 AM UTC

Hi Nik, Thanks for the update. I have tested for this issue with a break-point in the ProcessMnemonic_New method in Form1.cs and it does get hit when Alt+F is pressed. But I do see the StackOverflowException when Alt+X is pressed. I will further investigate this issue and get back to you with more information shortly. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Sean Greer
Replied On October 12, 2004 08:10 PM UTC

After updating to .NET 1.1 SP1 I too am experiencing this problem. Before I advise my clients to move forward with SP1 I''d like to see this issue resolved. Does Syncfusion have a workaround? Sean >Hi Nik, > >Thanks for the update. I have tested for this issue with a break-point in the ProcessMnemonic_New method in Form1.cs and it does get hit when Alt+F is pressed. But I do see the StackOverflowException when Alt+X is pressed. I will further investigate this issue and get back to you with more information shortly. We appreciate your patience and cooperation. > >Regards, >Guru Patwal >Syncfusion, Inc.

Administrator [Syncfusion]
Replied On October 13, 2004 11:53 AM UTC

Hi Nik and Sean, I have now modified my earlier workaround to care of this situation. The modified ProcessMnemonic method in the child form is as shown below : bool recursive = false; protected override bool ProcessMnemonic(char charCode) { if(this.recursive) return false; // In the 1.1 framework, the ProcessMnemonic is not being sent to the parent form, so // forward it to the parent form manually. bool retVal = base.ProcessMnemonic(charCode); if(retVal == false) { this.recursive = true; return ((Form1)this.MdiParent).ProcessMnemonic_New(charCode); } else return true; } The complete sample incorporating this workaround is attached here. Please refer to it and let me know if you need further assistance. Like I mentioned earlier, this seems to be an issue with the .NET framework v1.1. We do not intend to incorporate any fixes in the source code at this point of time, and wish to wait till the VS.NET Whidbey release. For now, we request you to use the workaround. We appreciate your cooperation and understanding on this issue. Regards, Guru Patwal Syncfusion, Inc.

Sean Greer
Replied On October 13, 2004 01:11 PM UTC

Guru, Thanks for the workaround. I understand that this is a .NET framework issue and appreciate your work on this item. Thanks again, Sean

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

;