We're filling the application menu with items as defined in our database. This works fine for the rest of the Ribbon, but when doing it with the ApplicationMenu, we keep getting the "The tools collection has not been initialized." error.
This is our code:
/* Create Button Tool */ assign oButtonTool = CreateButton(buffer bPrgTabGrpTool). /* Apply instance properties like image */ ApplyInstanceProps(oButtonTool, buffer bPrgTabGrpTool). poRibbon:ToolbarsManager:Tools:Add(oButtonTool). poRibbon:ApplicationMenu:ToolAreaLeft:Tools:AddTool(oButtonTool:Key).
If we replace the last two lines by the line below, we don't get the error anymore. But then we also don't see any images. The CreateButton method assigns the SharedPropsInternal:AppearancesSmall:Appearance:Image and SharedPropsInternal:AppearancesLarge:Appearance:Image properties, which is working fine for the rest of the Ribbon.
poRibbon:ApplicationMenu:ToolAreaLeft:Tools:Add(oButtonTool).
We're programming in OpenEdge 11.1, which is using NetAdvantage for .NET v2011 Vol2.
Hello,
The OpenEdge is not supported for NetAdvantage for Windows Forms. I do not think that this is the issue here, though.
Could you please try to attach if possible a small sample project reproducing the above mentioned issue, I will be happy to take a look at it?
Thanks for your reply, Boris.
The OpenEdge is not supported for NetAdvantage for Windows Forms.
That's strange. Progress bundled their development environment with the Infragistics controls.
Here's some example code which does the same as the code that fills my application menu. I couldn't get it in a working example. The toolbarsmanager stays in 'toolbar mode' instead of 'ribbon mode'.
/* my code */ oButtonTool = new Infragistics.Win.UltraWinToolbars.ButtonTool("MYKEY":U). assign oButtonTool:SharedProps:Caption = "My dynamic button":U oButtonTool:SharedProps:Enabled = true oButtonTool:SharedProps:DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle:TextOnlyAlways oButtonTool:SharedPropsInternal:AppearancesSmall:Appearance:Image = System.Drawing.Image:FromFile("MSoft/Forms/excel.png":U) oButtonTool:SharedPropsInternal:AppearancesLarge:Appearance:Image = System.Drawing.Image:FromFile("MSoft/Forms/excel_32.png":U). ultraToolbarsManager1:Ribbon:ToolbarsManager:Tools:Add(oButtonTool). ultraToolbarsManager1:Ribbon:ApplicationMenu:ToolAreaLeft:Tools:AddTool(oButtonTool:Key).
I have created a sample project based on your code, even if doing so makes no sense, just for you to see that your code works just perfectly fine and is correct!
The language you are using really is not supported, you could verify this in the following link:
http://es.infragistics.com/help/supported-environments/.
This does not mean, that I will not give my best to assist you on this, but I will need more than this code.
I think that your toolbarsmanager is in Ribbon mode, I do not know why you wrote that it is not. Do you mean that you are forcing it to be, but it is not?
Your scenario is not something specific, so it should work. If you are not able to provide a small sample project, which reproduces the issue, then I will be happy to provide a working one based on your exact requirements, please tell me if you need this.
Yes, Ribbon mode is enabled, but it's still showing as a toolbar.
If you can send me a working example that isn't causing this error AND shows the image of the ButtonTool in the Application Menu (another problem we're having), then I would be very happy.
I found the solution for the images not showing up. Turns out I have to set ToolAreaRight.Settings.ShowIconArea to True.