Control: Infragistics2.Win.UltraWinToolbars (SwfToolBar)Version: TestAdvantage 7.1.20071.40QTP 9.2 with .NET and WEB add-in
Our AUT has a Toolbar Ribbon that contains Tabs[.Groups[.Tools[. I need the ability to loop through the Members of each Collection. Typically, I use GetNAProperty to obtain a count of the Members of the Collection, so I know when to terminate the loop. However, I cannot locate a property in these Collections that contains a count. Is there a method or a process that will return a count of the Members of a Collection, or perhaps another way to terminate the loop before exceeding the index range? Thank you.
Some additional information: I have since tried the following...
Dim objTabs, objItemSet objTabs = .SwfToolbar("_Toolbars_Dock_Area_Top").GetNAProperty ("Ribbon.Tabs")Set objItem = CreateObject(objTabs)For each objItem in objTabs MsgBox "Collection Test", vbInformation, "Test"Next
I receive the following Run Error at the CreateObject line: ActiveX component can't create object: 'Infragistics.Win.UltraWinToolbars.RibbonTabCollection'
Any ideas?
To get the number of tabs in the ribbon you can use
TabsCount = .SwfToolbar("_Toolbars_Dock_Area_Top").GetNAProperty ("Ribbon.Tabs.Count")
and to get the number of groups in a specific tab (say the first tab)GroupsCount = .SwfToolbar("_Toolbars_Dock_Area_Top").GetNAProperty ("Ribbon.Tabs[0].Groups.Count")
To get the number of tools in a specific group (say the group of the first tab)GroupsCount = .SwfToolbar("_Toolbars_Dock_Area_Top").GetNAProperty ("Ribbon.Tabs[0].Groups[0].Tools.Count")
I hope that will help
Regards,
Ammar