I found the way to use a macro to change the button labels.
this would be one way:
ThisComponent.Drawpage.Forms.getByName(“MainForm”).getByName(“btnAdd”).Label = “Add”
no issues there.
What i cannot find an answer to, is how i would be able to underline one specific letter. In this case i want the button to have an underlined ‘A’ and not underlined ‘dd’.
In HTML i would simply do this < u >A< /u >dd. (without the space of course)
I’ve tried these two ways, but both do not work:
'1
com.sun.star.awt.FontUnderline.SINGLE
btnLabel = “A”
com.sun.star.awt.FontUnderline.NONE
btnLabel = btnLabel + “dd”
ThisComponent.Drawpage.Forms.getByName(“MainForm”).getByName(“btnAdd”).Label = btnLabel
'2
btnAdd = ThisComponent.Drawpage.Forms.getByName(“MainForm”).getByName(“btnAdd”).Label
btnAdd.setPropertyValue(CharUnderline,com.sun.star.awt.FontUnderline.SINGLE)
first just gives me a button with the label “Add”, no underlines.
second gives me an error (object variable not set)
is there a way to do this?
any help is appreciated.
thanks.