Hi Carsten > Yes, the XFrameActionListener is the correct listener. There is only a > problem with the order of notification. The layout manager which > controls the user interface elements is also XFrameActionListener. It > looks like that the layout manager is notified after you get your > notification. You can solve the problem using the > com.sun.star.frame.XLayoutManagerListener. The layout manager implements > the interface com.sun.star.frame.XLayoutManagerEventBroadcaster which > you have to use to add your listener. You can find the notifications in > com.sun.star.frame.LayoutManagerEvents. Use the UIELEMENT_VISIBLE > notification and the name of the user interface element: > "private:resource/menubar/menubar". Whenever you get > COMPONENT_REATTACHED you should wait for the UIELEMENT_VISIBLE > notification and then you change the menu bar.
I solved it this way: I registered a XLayoutManagerListener, as you adivsed. I do not receive a UIELEMENT_VISIBLE event, but a LAYOUT_EVENT (event number 2). When this event is fired, I first check if the menu items already exist. If not they are added again. Thank you for your help! Greetings, Tobias P.S.: Thank you for adding support of icons for transient toolbar items in OOo 2.3. I really appreciate this feature! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
