'Activity module
Sub Process_Globals
End Sub
Sub Globals
'designer
Dim pnlDati As Panel
Dim lblProva As Label
Dim btnOK As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
activity.LoadLayout("main")
dimensionaLayout
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
'Sub FindTextSize(BG As Canvas , Text As String, Tface As Typeface , DesiredWidth As Int ) As Int
'Dim temp As Int, LastHeight As Int
'LastHeight=1
'Do Until temp>=DesiredWidth
'temp = BG.MeasureStringWidth(Text, Tface, LastHeight)
'If temp<desiredwidth Then
'lastheight=lastheight+1
'End If
'Loop
'Return lastheight
'End Sub
Sub dimensionaLayout
'adapt to cell screens
Dim H,W As Double
H=100%y
W=100%x
Dim pH,pW As Double
pnlDati.Left=0
pnlDati.Top=0
pnlDati.Width=W
pnlDati.Height=H
pH=pnlDati.Height
pW=pnlDati.Width
'Views contaibed in pnlDati:
btnOK.Left=pW*29.28571/100
btnOK.Top=pH*80/100
btnOK.Width=pW*35.71429/100
btnOK.Height=pH*15/100
'...call for textresize
lblProva.Left=pW*14.28571/100
lblProva.Top=pH*5/100
lblProva.Width=pW*64.28571/100
lblProva.Height=pH*15/100
'...call for textresize
End Sub