I am using the Ultra Toolsbars Manager. Is there a way to disable activiating the toolbar when F10 is pressed?
I know F10 is the standard in windows for activiating the menu. In other applications where I don't use the Ultra Toolbars Manager I can disable the menu from being actiavted when F10 is pressed.
Have you found a solution? I have the same problem.
No i didn't
There is currently no way to disable the F10 functionality. You can submit a feature request to be able to turn this off: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
Are you kidding? This seems to have changed somewhere between 8.2 and 9.1. Assigning F10 to a main menubar item will no longer fire a toolbar click event, but instead seems to set the focus on the first available toolbar button if found.
Hello Sassan,
The "problem" is not solved yet, because this behavior is expected and it is by design (it is similar with Microsofts toolbars) For more information:
http://msdn.microsoft.com/en-us/library/hh179479(v=nav.71).aspx
http://office.microsoft.com/en-us/powerpoint-help/use-the-keyboard-to-work-with-ribbon-programs-HA010091908.aspx
Of course you can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.
Regards
Hi,
is that probem already solved on an easy way - like i.e. a build in attribute/flag that can be set?
Kind regards,
Sassan Torabi-Goudarzi
i just updated from 6.2 to 9.1 and had the same problem - after i read this thread i did the following:
On Creation of the Toolbar i add a "dummy" Button with a Shortcut F10:
//Check if the Toolbar Manager has a Tool with a Shortcut F10 bool hasF10Shortcut = false; foreach (Infragistics.Win.UltraWinToolbars.ToolBase toolBase in this.ToolbarManager.Tools) { if (toolBase.SharedProps.Shortcut == Shortcut.F10) { hasF10Shortcut = true; } } //If there is no F10 Shortcut -> add one if (!hasF10Shortcut) { Infragistics.Win.UltraWinToolbars.ButtonTool buttonF10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("F10_Messenger"); buttonF10.SharedProps.Shortcut = Shortcut.F10; buttonF10.SharedProps.Visible = false; this.ToolbarManager.Tools.Add(buttonF10); }
No i hook into the "BeforeShortcutKeyProcessed" Handler:
void toolbarManager_BeforeShortcutKeyProcessed(object sender, Infragistics.Win.UltraWinToolbars.BeforeShortcutKeyProcessedEventArgs e) { if (e.Tool.Key == "F10_Messenger") { //If F10 was sent, do whatever you want to do (i send the F10 back to the TextBox where it came from) e.Cancel = false; if (this.ActiveControl != null) { IntPtr hWnd = this.ActiveControl.Handle; SendMessage(hWnd, (int)0x0100, (IntPtr)Keys.F10, IntPtr.Zero); this.ActiveControl.Focus(); } } }
That seems to work for me.
I also tried to inherit a class from the ToolbarManager, Implement the IMessageFilter interface and override the bool System.Windows.Forms.IMessageFilter.PreFilterMessage(ref System.Windows.Forms.Message msg) Method
Maybe that could work four you...
Regards,
Lex