First post; new to the software. I've been trying out examples I've found on this site. It's being going well up to now.
For the code below (pasted in), modified from something I found on the site, the scrolling canvas works for '40 rows',.e., all 40 text rows are drawn. When I set rows to 41, no text is drawn; however the loop is executed.
Help would be appreciated.
Thanks.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim SV As ScrollView
Dim canvas1 As Canvas
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim rows As Int = 41
SV.Initialize(500dip)
SV.Panel.Height = rows * 50dip
SV.Panel.Width = 500dip
Activity.AddView(SV,0,0,200,500)
canvas1.Initialize(SV.Panel)
For i = 1 To rows
canvas1.DrawText("row: " & i,50dip,i*50dip,Typeface.MONOSPACE,18,Colors.Yellow,"CENTER")
Next
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
For the code below (pasted in), modified from something I found on the site, the scrolling canvas works for '40 rows',.e., all 40 text rows are drawn. When I set rows to 41, no text is drawn; however the loop is executed.
Help would be appreciated.
Thanks.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim SV As ScrollView
Dim canvas1 As Canvas
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim rows As Int = 41
SV.Initialize(500dip)
SV.Panel.Height = rows * 50dip
SV.Panel.Width = 500dip
Activity.AddView(SV,0,0,200,500)
canvas1.Initialize(SV.Panel)
For i = 1 To rows
canvas1.DrawText("row: " & i,50dip,i*50dip,Typeface.MONOSPACE,18,Colors.Yellow,"CENTER")
Next
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub