Private Sub mysalary_Resize(Width As Int, Height As Int) 'resize sub '| nr. 3
Log("mysalary resize sub")
'start rexize all views
ratiox = Width/414 'iphone 6+ 5.5" = x414
ratioy = Height/716 'iphone 6+ 5.5" = y736 - 20!
density = GetDeviceLayoutValues.DeviceApproximateScreenSize / 5.27
For Each v As View In mysalary.RootPanel.GetAllViewsRecursive
If Not(v.Tag = "dnrm") Then
v.Width = v.Width*ratiox
v.Height = v.Height*ratioy
v.Left = v.Left*ratiox
v.Top = v.Top*ratioy
End If
If v Is Label Then
Dim lbl As Label = v
Dim fontsize As Int = lbl.Font.Size
Dim fontname As String = lbl.Font.Name
lbl.Font = Font.CreateNew2(fontname, fontsize*density)
else if v Is Button Then
Dim btn As Button = v
Dim fontsize As Int = btn.CustomLabel.Font.Size
Dim fontname As String = btn.CustomLabel.Font.Name
btn.CustomLabel.Font = Font.CreateNew2(fontname, fontsize*density)
else if v Is TextField Then
Dim txtf As TextField = v
Dim fontsize As Int = txtf.Font.Size
Dim fontname As String = txtf.Font.Name
txtf.Font = Font.CreateNew2(fontname, fontsize*density)
End If
Next
loadvalues
addtosv(salaryp1) 'load page1
End Sub