Manipulate menu item titles (text) defined in Addons.xcu
Manipulate menu item titles (text) defined in Addons.xcu
I have a very nice addon programmed in C++ and the related menu items are stored in Addons.xcu. The addon would be even nicer if I could adjust the menu item texts as the user works similarly to how the undo, redo, and repeat items function in the edit menu. I can't figure out how to get ahold of the XMenu associated with my addon. From there it seems that I could use setItemText(). Who knows how to get that XMenu and is willing to tell? Thanks.
Apache OpenOffice 4.0.1
Windows, Linux, MacOS
Windows, Linux, MacOS
Re: Manipulate menu item titles (text) defined in Addons.xcu
The solution to this was to set the menu item text in featureStateEvent.State. This is the same place a menu item can be enabled or disabled. I just didn't realize that the state is the text. Problem solved. Thanks Ariel.
Apache OpenOffice 4.0.1
Windows, Linux, MacOS
Windows, Linux, MacOS