such as the icons for cut, copy, paste etc. Can this be done - if so how do I find the URLs for the icons I want?
This old thread seemed to asked something similar and I've tried ".uno:Cut" and "ImageIdentifier" as the property name but don't get an icon
viewtopic.php?f=44&t=6591
I've also found this which might be part of the solution?
https://www.openoffice.org/api/docs/com ... rties.html
Code: Select all
sub showpopup()
dim arect,oPopup,i
dim dlg
oLib = DialogLibraries.GetByName("Standard")
dlg = CreateUnoDialog(oLib.GetByName("Dialog1"))
aRect = CreateUnoStruct("com.sun.star.awt.Rectangle")
oPopup = CreateUnoService("stardiv.vcl.PopupMenu")
oPopup.insertItem(1, "Cut",0, 1)
Dim oGraphicProvider
Dim aProp(1) as new com.sun.star.beans.PropertyValue
oGraphicProvider = createUnoService("com.sun.star.graphic.GraphicProvider")
aProp(0).Name = "URL"
aProp(0).Value = convertToUrl("c:\a\untitled.bmp")
oPopup.setItemImage 1,oGraphicProvider.queryGraphic(aProp()),true
oPopup.setCommand(1, "Cut")
n = oPopup.execute(dlg.getpeer, aRect, com.sun.star.awt.PopupMenuDirection.EXECUTE_DEFAULT)
end sub