I have a problem.
If a control (e.g.. button) is located in a dialog the control has assigned a keyboard key (we can use "~" to force a key).
But how to enable keyboard control when we use vcl window?
I have created a window:
Code: Select all
with winDesc1b
rect.width = 100
rect.height = 100
.type = com.sun.star.awt.WindowClass.SIMPLE
.WindowServiceName = "window"
.ParentIndex = 0
.Parent = peerWin0
.Bounds = rect
End with
peerWin1b = tlKit.createWindow(winDesc1b)
with peerWin1b
.setBackground(rgb(235,235,235))
.setPossize(615, 0, 305, 605, com.sun.star.awt.PosSize.POSSIZE)
.setVisible(true)
end with
Code: Select all
butImgSizeDecrM = createUnoService("com.sun.star.awt.UnoControlButtonModel")
butImgSizeDecrC = createUnoService("com.sun.star.awt.UnoControlButton")
with butImgSizeDecrM
.label = "~Img. decr."
.fontHeight = 9
.enabled = false
.focusOnClick = false
end with
with butImgSizeDecrC
.setModel(butImgSizeDecrM)
.actionCommand = "butImgSizeDecr"
.setPosSize(180, 325, 30, 30, com.sun.star.awt.PosSize.POSSIZE)
.createPeer(tlKit, peerWin1b)
end with
How to enable it?