Hi Carsten, thank you for answering the question of Andrej who is a colleague of mine. I am continuing the work with Andrej's code.
> I looked over your example and I am not sure what you want to do. Can > you please explain what do you want to achieve? Create a new top-level > menu or do you want to add a popup menu into an existing top-level menu, > like "File"? For our own UNO-Component we would like to create a *new* top-level menu that is able to contain either simple-Elements (Type.BUTTON) AND nested Sub-Menus. > > One comment to your example. Please NEVER create a settings container > using a ui configuration manager and insert it into another container. A > container which is created by a ui configuration manager is always a > root container! Every container itself is a factory to create its own > sub containers. The referenced example in oooforum is wrong in that point! I think this hint points us to the root of our problems, as we currently always use the ModuleUIConfigurationManager to create new settings-instances even for sub containers. I am trying to change this, but I can't find the corresponding entry point. So which is the access point for us to create new sub containers? If my interpretation your statement above is correct, you say that each settings-instance provides a corresponding factory for sub containers. So I xray'ed an existing settings object, which I got using the following basic-lines, but the object doesn't export an Interface that seems to me the right one: sMenuBar = "private:resource/menubar/menubar" oModel = ThisComponent oLayoutManager = oModel.getCurrentController().getFrame().LayoutManager() oMenuBar = oLayoutManager.getElement( sMenuBar ) settings = oMenuBar.getSettings(true) settings supports the following Interfaces: com.sun.star.beans.XFastPropertySet com.sun.star.beans.XMultiPropertySet com.sun.star.beans.XPropertySet com.sun.star.container.XElementAccess com.sun.star.container.XIndexAccess com.sun.star.container.XIndexContainer com.sun.star.container.XIndexReplace com.sun.star.lang.XSingleComponentFactory com.sun.star.lang.XTypeProvider com.sun.star.lang.XUnoTunnel com.sun.star.uno.XInterface Is it the XSingleComponentFactory I have to use to create the sub containers? Just to write a quick test-example in basic: How can I create a instance using basic? settings.createInstance() didn't work and I don't know how to get the required XComponentContext in Basic to call the settings.createInstanceWithContext()-Method. best regards, Christoph --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]