outofbounds

ringmyr

Member
Licensed User
Longtime User
what this mean?
i have a max number of 180 lines
and i call this line

B4X:
If nr = 180 Then
   nr = 0
SetText
   else   
   nr = nr +1
SetText   
End If

i got the error when nr is 180 and i want it to change to 0
java.lang.IndexOutOfBoundsException: Invalid index 180, size is 103


settext code
B4X:
Log(nr)
   txt = list1.Get(nr) ' here i got the error
   Log (txt)
   lblText.Text = txt               ' set the text string to the Label text property
   ht =    StrUtil.MeasureMultilineTextHeight(lblText, txt)   ' measure Label height
   scvText.Panel.Height = ht      ' set the ScrollView internal Panel height to the measured height
   lblText.Height = ht               ' set the Label height to the measured height

   scvText.ScrollPosition = 0

i use your longtext code
 
Last edited:

ringmyr

Member
Licensed User
Longtime User
:BangHead: im looking at wrong txt file !
one file has 180 lines and that one i use has only 103 lines..

so simpel to many files, I have to start using the delete button more.

thx
 
Upvote 0
Top