Hi James,
When I try the following lines, when it gets to the setPropertyValue
below I get an IllegalS
There are more properties than what I have here, and it works if I don't
set the property 'PushButtonType'.
Object buttonModel = xMultiServiceFactory.createInstance(
"com.sun.star.awt.UnoControlButtonModel" );
XPropertySet xPSetButton = ( XPropertySet
)UnoRuntime.queryInterface(
XPropertySet.class, buttonModel );
xPSetButton.setPropertyValue("PushButtonType", PushButtonType.OK);
I get:
com.sun.star.lang.IllegalArgumentException: Unable to convert the given
value for the property PushButtonType
What did I do wrong?
Looks like an issue to me ... the Property "PushButtonType" expects a
Short and "css.awt.PushButtonType.OK" can obviously not be converted to
this.
As workaround
xPSetButton.setPropertyValue("PushButtonType", new
Short((short)PushButtonType.OK_value));
should do the trick.
Hope that helps
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]