A form control is placed on a drawing shape (com.sun.star.drawing.XControlShape),
so you need to obtain the shape underlying the control to manage his size and pos.
Andrew Pitonyaks Tools Library (module "ModuleControls") supplies some facilities in order to work with form controls.
Check those functions:
- GetControlModel()
- GetControlShape()
- GetControlView()
Sub SeeThingProp
Dim oForm, oControl, iNumControls%, i%
Dim v()
'By default this is where the controls are
oForm = ThisComponent.Drawpage.Forms.getByName("Standard")
' oControl = oForm.getByName("MyPushButton")
oControl = oForm.getByName("CheckBox")
Dim vShape
Dim vPosition, vSize
Dim s$, vv
vShape = GetControlShape(ThisComponent, "CheckBox")
vPosition = vShape.getPosition()
vSize = vShape.getSize()
' RunSimpleObjectBrowser(vSize)
s = s & "Position = (" & vPosition.X & ", " & vPosition.Y & ")" & CHR$(10)
s = s & "Height = " & vSize.Height & " Width = " & vSize.Width & CHR$(10)
MsgBox s
End Sub