Apache OpenOffice (AOO) Bugzilla – Issue 83964
css.awt.UnoControlButtonModel with property "PushButtonType" and "ImageURL" makes button multiline
Last modified: 2013-02-24 21:07:33 UTC
Hi together, here ist my Java code: -----%<----- Object buttonModel04 = xMSF.createInstance( "com.sun.star.awt.UnoControlButtonModel"); XPropertySet xPSetCancelButton = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, buttonModel04); xPSetCancelButton.setPropertyValue("PositionX", new Integer(100)); xPSetCancelButton.setPropertyValue("PositionY", new Integer(120)); xPSetCancelButton.setPropertyValue("Width", new Integer(50)); xPSetCancelButton.setPropertyValue("Height", new Integer(14)); xPSetCancelButton.setPropertyValue("Name", "Close"); xPSetCancelButton.setPropertyValue("PushButtonType", new Short((short) 2)); xPSetCancelButton.setPropertyValue("ImagePosition", com.sun.star.awt.ImagePosition.LeftCenter); xPSetCancelButton.setPropertyValue("ImageURL", "close.gif"); xPSetCancelButton.setPropertyValue("Label", new String(" Close")); ----%<----- This code produces a button with the image in the first line and the text "Close" in the second line. Not setting the PropertyValue "PushButtonType" creates the button as intended: one line with the image left centered. Greetings, Tobias
jsc -> cd: seems to be one for you
cd: Set target to OOo 3.0.
3.x