Hi all,
I'm developing an addon using OOo SDK. In my addon, I want to
enable/disable menu items and/or buttons on toolbar in runtime
by using a basic macro code like follows.
*** To disable ***
acc =
provider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess",
prop())
propSet = acc.createInstance("com.sun.star.beans.XPropertySet")
propSet.setPropertyValue("Command", "macro:///someFunction")
acc.insertByName("foo", propSet)
acc.commitChanges()
*** To enable ***
acc =
provider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess",
prop())
acc.removeByName("foo")
acc.commitChanges()
***************
Yes I can change the enable/disable status by above code. But, the
GUI is not updated immediately when I run the code to enable commands.
The GUI is updated when I restart OpenOffice at last. Is it possible
to update GUI as soon as we call the code to enable? Please give me a
help.
The platform I'm using is as follows.
* Windows XP Home Edition (SP2)
* OpenOffice.org 2.0.1 (The macro is run on Calc)
Thanks a lot for your help.
----
Muneyuki Kawatani
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]