Hi...
I Use VS2008 and Infragistics WinForm v11.2
I have to been child form the toolbar is dynamic added to the MDI Form RibbonGroup
but Begin a Group is not displayed.
Public Sub SetChildToolButton(ByRef poToolbar As Infragistics.Win.UltraWinToolbars.UltraToolbar)
Dim RibbonGroup1 As Infragistics.Win.UltraWinToolbars.RibbonGroup = New Infragistics.Win.UltraWinToolbars.RibbonGroup("ribbonGroup_Child") RibbonGroup1.Caption = "Child"
For Each oTool As Object In poToolbar.Tools oTool.InstanceProps.MinimumSizeOnRibbon = Infragistics.Win.UltraWinToolbars.RibbonToolSize.Large RibbonGroup1.Tools.AddRange(New Infragistics.Win.UltraWinToolbars.ToolBase() {oTool}) Next
UltraToolbarsManager1.Ribbon.Tabs("ribbon1").Groups.Add(RibbonGroup1)
End Sub
How do I ??
Attach the source Ask for help.
Attach the source...
Hello Jun,
Thank you for contacting Infragistics.
The only way to separate tools in the ribbon is by placing them in separate ribbon groups.
The InstanceProps.IsFirstInGroup property is intended for use in a regular toolbar or menu.
Please let me know if you have any other questions about this.
Thank you for answer but In design mode, can make a group in the ribbon. Should not be dynamically...
Thank you for your response.
You are correct. Setting InstanceProps.IsFirstInGroup at design-time does start a new group. It will also work at run-time if you set the properties in the correct order. You need to add the tool to the RibbonGroup first and then set the InstanceProps.IsFirstInGroup property off the instance of the tool in the RibbonGroup. Code similar to the following will work.
var tool = new ButtonTool("dynamicTool");ultraToolbarsManager1.Tools.Add(tool);tool.SharedProps.Caption = "Dynamic Tool";ultraToolbarsManager1.Ribbon.Tabs[0].Groups[0].Tools.AddTool(tool.Key);ultraToolbarsManager1.Ribbon.Tabs[0].Groups[0].Tools[tool.Key].InstanceProps.IsFirstInGroup = true;
Thank you for answer.
I have attached the source and how you can do?
It doesn't appear that your source was attached to this thread? Please zip/compress them first and try again. Also, can you please clarify your question. I see that Dave has provided you a solution. Do you have any questions about it? Keep in mind that the code he provided needs to be in that exact order.
Let me know if you have any additional questions regarding this matter.