' Called from Main.Mainform_Resize
Public Sub Resize(width As Double, height As Double)
If dialog1.Visible Then
Dim dx = width - dialog1.Base.Width, dy = height - dialog1.Base.Height As Int
For i = 0 To dialog1.Base.NumberOfViews - 2 'the last view is the content view
Dim v As B4XView = dialog1.Base.GetView(i)
v.Left = v.Left + dx
v.Top = v.Top + dy
Next
dialog1.Base.SetLayoutAnimated(0, 0, 0, width, height)
dialog1.Resize(width, height)
Dim ContentPanel As B4XView = dialog1.Base.GetView(dialog1.Base.NumberOfViews - 1)
ContentPanel.SetLayoutAnimated(0, 0, 0, width, height - dialog1.ButtonsHeight - 3dip)
End If
End Sub