I'd like to get the name and the label of some controls included in a dialog in LibreOffice Basic.
I can call getImplementationName()
on my example controls.
I get these : stardiv.Toolkit.UnoEditControl
, stardiv.Toolkit.UnoCheckBoxControl
, stardiv.Toolkit.UnoRadioButtonControl
.
What I'm interested in is the name of these controls, parametrized while building them with the GUI.
Here is my code :
Sub test()
Dim Dlg As Object
Dim Controls As Object
Dim cControl As Object
Dim I As Integer
Dim A As String
DialogLibraries.LoadLibrary("Standard")
Dlg = CreateUnoDialog(DialogLibraries.Standard.BoiteDeDialogue1)
Controls = Dlg.Controls
I = 0
A = ""
For Each cControl In Controls
I = I + 1
A = A & cControl.getImplementationName()
' How to get back the name of cControl here ?
Next cControl
MsgBox "There is " & I & " controls in that form !" & A
End Sub