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).