iOS Question Update Text Label

RobertoS

Member
Licensed User
Hello,
I have a problem with an application that must show the progress of the import of some data. The Label that should be updated with each new entry does not change, but remains only the first entry.
If, however, the program is blocked, the label is updated.
Below is an example of what the app does.

Thanks

Best regards
 

Attachments

  • testLabelUpdate.zip
    26.7 KB · Views: 176

RobertoS

Member
Licensed User
Try this, if you want to keep the old text :
B4X:
lbWait.text = lbWait.text & s

if you
B4X:
lbWait.text = s
write this, then the old text is overwritten


My problem is different, I have to constantly update a label with a different text each time. The example I attached in the first post shows the problem.

Thanks

Roberto
 
Upvote 0

klaus

Expert
Licensed User
You should move Sleep(0) from the aggiornaWait routine to the updateLabel routine.
B4X:
Public Sub updateLabel()
    For idx = 0 To 1000   
        CallSub2(Main, "aggiornaWait", "Test Label " & idx)
        Sleep(0)
    Next
End Sub
 
Upvote 0
Top