Hi
I want a separator between two tools in the ribbon group(Vertical line between the tools as in Sort & Filter group in the Data tap in the MicroSoft Excel sheet ). I am setting the InstanceProp .IsFirstInGroup to true, but the separator is not coming between the tools.Someone please help me to solve the above mentioned problem.
Thanks in advance
Regards
Navi
Thanks Mike
It sounds like there may have been a bug in 7.1. Unfortunately, this version is no longer supported, so you will have to upgrade to a later version or a newer hotfix of 7.1 to get this working.
Thanks for the reply.
The code you have sent is worked for me, i.e I didnot get any exception. But still I didnot get the separator.
I am using Infragistics 2007 Volume 1 CLR 2.0 build. Is this problem due to the my version of the Infragistics?
Looks ok to me. And for me it works, at least with Infragistics 2008.2 build 2022.
I would try to get the new instance returned by the AddTool method on ToolsCollection of the ribbon group, set it's InstanceProps and check to see if they are set on the instance referred by m_ToolBarManager.Ribbon.Tabs["Charts"].Groups["Betting Charts"].Tools["Investment"]:
ButtonTool addedInvestmentTool = m_ToolBarManager.Ribbon.Tabs["Charts"].Groups["Betting Charts"].Tools.AddTool(InvestmentTool .Key);addedInvestmentTool.InstanceProps.PreferredSizeOnRibbon = RibbonToolSize.Large;addedInvestmentTool.InstanceProps.IsFirstInGroup = true;if (addedInvestmentTool.InstanceProps.IsFirstInGroup != m_ToolBarManager.Ribbon.Tabs["Charts"].Groups["Betting Charts"].Tools["Investment"].InstanceProps.IsFirstInGroup){ throw new Exception("IsFirstInGroup property could not be set!");}
Emanuel
Hi Emanuel Haisiuc
Actually I setting the IsFirstInGroup to true exactly the way you have said. The code I am using is
ButtonTool InvestmentTool = new ButtonTool("Investment"); InvestmentTool .SharedProps.Caption = "Investment"; InvestmentTool .SharedProps.Tag = this; m_ToolBarManager.Tools.Add(InvestmentTool ); m_ToolBarManager.Ribbon.Tabs["Charts"].Groups["Betting Charts"].Tools.AddTool(InvestmentTool .Key); m_ToolBarManager.Ribbon.Tabs["Charts"].Groups["Betting Charts"].Tools["Investment"].InstanceProps.PreferredSizeOnRibbon = RibbonToolSize.Large; m_ToolBarManager.Ribbon.Tabs["Charts"].Groups["Betting Charts"].Tools["Investment"].InstanceProps.IsFirstInGroup = true;
Can you suggest me, what is going wrong in this code.