Page 1 of 1

[Solved]Toggle check mark in menu items for Python extension

PostPosted: Mon Dec 24, 2018 12:41 am
by jmarch
[Solved] I'm developing an OpenOffice extension using Python. I would like to toggle on/off a check mark for the menu item when it is selected. I have added my menu items in Addons.xcu, but I'm not sure how to access them in Python code to toggle the check status when they are clicked. Any help would be really appreciated.
Thanks.

Re: Toggle check mark in menu items for Python extension

PostPosted: Tue Jan 01, 2019 2:15 pm
by hanya
Post by calling statusChanged with FeatureStateEvent.State = bool in your dispatch object.
So you need dispatch object and you have to receive object which implements css.frame.XStatusListener when your dispatch provider is called.

Re: Toggle check mark in menu items for Python extension

PostPosted: Wed Jan 02, 2019 7:20 pm
by jmarch
Thanks! That helped a lot. That is working now.