Android Question Scrolling problem with the TABLE class

GEoffT

Member
Licensed User
Longtime User
I have a table in my app to which rows get added as the app progresses.

The table will not vertically scroll.

If I add all the rows at the start it scrolls quite happily.

Can anyone give me a clue as to why?

Thanks in anticipation Geoff
 

DonManfred

Expert
Licensed User
Longtime User
Without seeing your code and what you have done and how it is hard to give any concrete answer.

Export and zip your project and upload it
 
Upvote 0

GEoffT

Member
Licensed User
Longtime User
It is quite a big app so I have copied the relevant bits...Hope this helps!

This is the sub where the table is created:

Sub buildScoreSheet
Dim nocols As Int
nocols = Main.arrPerEnd +3
Log("nocols " & nocols)
tblScore.Initialize(Me, "tblscore", nocols,1,False)
tblScore.AddToActivity(pl1, 0, 0dip, 100%x, 100%y)

Select Case nocols
Case 9
tblScore.SetHeader(Array As String("", "", "", "", "", "", "","Tot", "Running"))
tblScore.SetColumnsWidths(Array As Int(11%x, 11%x, 11%x, 11%x,11%x,11%x, 2%x, 12%x, 19%x))
Case 8
tblScore.SetHeader(Array As String("", "", "", "", "", "","Tot", "Running"))
tblScore.SetColumnsWidths(Array As Int(12%x, 12%x, 12%x,12%x,12%x, 2%x,14%x, 20%x))
Case 6
tblScore.SetHeader(Array As String("", "", "", "","Tot", "Running"))
tblScore.SetColumnsWidths(Array As Int(17%x, 17%x,17%x, 4%x, 18%x, 22%x))
End Select
tblScore.ClearAll

noArrowsScored =0
noArrowsScoredThisEnd =0
DistanceNo = 0
endNo = 0
endScore=0
roundScore = 0
End Sub


And this is the sub that adds the rows

Sub addtosheet(Mark As String, score As Int)
Dim strScore As String
strScore= score
endScore = endScore + score
roundScore = roundScore + score
currentRow = endNo + DistanceNo
If noArrowsScoredThisEnd =0 Then
Select Case Main.arrperend
Case 6
tblScore.AddRow(Array As String(Mark,"","","","","","",strScore,""))
Case 5
tblScore.AddRow(Array As String(Mark,"","","","","",strScore,""))
Case 3
tblScore.AddRow(Array As String(Mark,"","","",strScore,""))
End Select
tblScore.jumptoRow(currentRow)
'tblScore.RowColor2((currentRow) =Colors.LightGray
Else If noArrowsScoredThisEnd = Main.arrPerEnd Then
noArrowsScoredThisEnd = noArrowsScoredThisEnd - 1
Else
Select Case Main.arrPerEnd

Case 6
tblScore.SetValue(noArrowsScoredThisEnd, currentRow,Mark)
tblScore.SetValue(7, currentRow,endScore)
tblScore.SetValue(8, currentRow,roundScore)

Case 5
tblScore.SetValue(noArrowsScoredThisEnd, currentRow,Mark)
tblScore.SetValue(6, currentRow,endScore)
tblScore.SetValue(7, currentRow,roundScore)
Case 3
tblScore.SetValue(noArrowsScoredThisEnd, currentRow,Mark)
tblScore.SetValue(4, currentRow,endScore)
tblScore.SetValue(5, currentRow,roundScore)
End Select

End If
noArrowsScoredThisEnd = noArrowsScoredThisEnd + 1

If noArrowsScoredThisEnd = Main.arrPerEnd Then
btnCancel.Visible=True
btnEnter.visible=True
End If
End Sub
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
THIS IS NOT the correct forum for this.
THIS is the sub-forum to post issues or doubts about the usage of the forum itself!
Also, when posting code, please use the code tags
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Its up to EREL to do it...
 
Upvote 0
Top