I am working on an educational game. During the game some mistakes are made. After some time the user wants to know what kind of mistakes were made and does so by clicking the scoreboard. I then present an EditText (single line property = false) and I try to show three or more mistakes, each on their own line.
My source:
'There is a global variable called Mistakes as list (Of strings)
'Score_INFO is an EditText (outlined to the left and the top)
But, what happens? Only the last Mistake from the list Mistakes is shown and earlier mistakes are overwritten. (By the way: the same happens if I use a label in stead of an EditText.)
What is the mistake I make?
TD
My source:
'There is a global variable called Mistakes as list (Of strings)
'Score_INFO is an EditText (outlined to the left and the top)
B4X:
Sub scoreboard_Click
Dim Mistake As String 'In the list Mistakes every mistake is an individual string
Dim nr As Int
Score_INFO.SingleLine = False 'to make sure that more lines are used
For nr = 0 To Mistakes.Size-1
Mistake = Mistakes.Get(nr)
Score_INFO.Text = Mistake & CRLF
Next
End Sub
What is the mistake I make?
TD