Hi all
I am using the following to centre my panels (I have lots of them):
The code does centre the panels...however, once the Sub has finished executing, the panels move back to the position they are in the designer.
Does anybody know why?
Thanks
I am using the following to centre my panels (I have lots of them):
B4X:
Sub PositionThePanels
For Each v As View In Page1.RootPanel
If v Is Panel Then
Dim PanelTag As String
PanelTag = v.Tag
If PanelTag.StartsWith("Lesson") Then
v.Left = (Page1.RootPanel.Width - v.Width) / 2
v.Top = (Page1.RootPanel.Height - v.Height) / 2
End If
End If
Next
End Sub
The code does centre the panels...however, once the Sub has finished executing, the panels move back to the position they are in the designer.
Does anybody know why?
Thanks