Sub Process_Globals
'
End Sub
Sub Globals
Dim WholeScreen As Panel
Dim scvText As ScrollView
End Sub
Sub Activity_Create(FirstTime As Boolean)
WholeScreen.Initialize("")
Activity.AddView(WholeScreen, 0, 0, 100%x, 100%y)
WholeScreen.Color = Colors.White
FillScrollView
End Sub
Sub Activity_Resume
'
End Sub
Sub Activity_Pause (UserClosed As Boolean)
'
End Sub
Sub FillScrollView
scvText.Initialize(100%y)
WholeScreen.AddView(scvText, 2%x, 0, 96%x, 100%y)
scvText.Color = Colors.Black
Dim StrUtil As StringUtils
Dim lblHeight, lblHeight1 As Float
For i = 0 To 49
Dim lbl As Label
lbl.Initialize("evlbl")
lbl.Color = Colors.White
lbl.TextColor = Colors.Black
lbl.Text = "This is line #" & (i+1)
scvText.Panel.AddView(lbl, 0, lblHeight1, 96%x, 20dip)
lblHeight = StrUtil.MeasureMultilineTextHeight(lbl, lbl.Text)
lbl.Height = lblHeight + 12dip
lbl.Gravity = Gravity.CENTER_VERTICAL
lblHeight1 = lblHeight1 + lblHeight + 13dip
scvText.Panel.Height = lblHeight1
Next
'DoEvents '<<<--- still needed to scroll to position???
scvText.ScrollToNow(lblHeight1/2)
End Sub