the headline is maybe a little bit unclear, but there are in OO at various places of menus entries which can be activated and where this activation is visualized by a check mark, e.g.:
How can you get this behavior for your own menus, which are passed to extensions via Addon.xcu?
Of course this is also about own menu items (with which macros should be started) and not about standard menu items existing in OO which contain the 'checkmark functionality' anyway.
E.g. a macro is to be started with a menu item, which assigns an event to the current table
Code: Select all
Sub activate_2()
Dim mEventProps(1) as new com.sun.star.beans.PropertyValue
mEventProps(0).Name = "EventType"
mEventProps(0).Value = "Script"
mEventProps(1).Name = "Script"
mEventProps(1).Value = "vnd.sun.star.script:SpecialInput.work.Zwei_Nachkommastellen?language=Basic&location=application"
ThisComponent.CurrentController.ActiveSheet.Events.ReplaceByName("OnChange", mEventProps())
End Sub
greetings
Jörg