Hi,
is it possible to activate a Ribbon Tool so that it will be focused like the active Control on a Windows Form?
When im trying to set the Active State with the "IsActiveTool" Property the following Error appears:
Can't activate a root tool. Only tool instances that are in an UltraToolbar's or PopupMenuTool's Tools collection can be activated.
The same Error occurs when im using the "ActiveTool" Property on the Toolbars Manager.
Im using the Infragistics 2007 Volume 3 Version of the Toolbar.
Whats the Problem? Ribbon Tools cant have Sub Items i think?!? So why i cant activate a Ribbon Tool?
Thank you very much. That worked.
Since I program in VB.NET and your answer was in C#, I had to use a translator to get the equivalent statement (as you can see it's not a simple translation, since VB uses CType). For anyone else who needs this functionality, this is the translation that worked in VB.
CType(tbrForm.Ribbon.Tabs(0).Groups(1).Tools("cbSuperfamily"), Infragistics.Win.UltraWinToolbars.ComboBoxTool).IsInEditMode = True
Hello sch,
Could you please try out the following code and see if it helps:
((ComboBoxTool)ultraToolbarsManager1.Ribbon.Tabs[0].Groups[0].Tools["ComboBoxTool1"]).IsInEditMode = true;
Please let me know if the above suits your needs.
This is an old post, but I'm running into this same problem, but slightly different.
The original question concerned setting a TextBox to be active. In my case I am having the same problem, but with a ComboBox.
I have done the following
tbrForm.Ribbon.Tabs(0).Groups(1).Tools("cbSuperfamily").IsActiveTool = True
But when I begin to type, nothing happens.
How can I activate the ComboBox?
Thanks
As I said earlier, the root tools are never displayed. That is why they can not receive focus. You need to activate one of the instance of the tool. You can either activate the first visible tool instance by getting the txtMemberID.SharedProps.ToolInstances[0], or you can activate the instance of the tool specifically in the quick access toolbar (the area next to the Office 2007 application menu button) by getting this.utmMenu.Ribbon.QuickAccessToolbar.Tool[txtMemberID.Key]