Reputation: 31
TextInput
class
Is there any way to append or edit text ???
Problem:
I created TextInput
object and accessed text method to print strings.
But every time I access text method, it prints new string and it doesn't retain previous value.
How to fix the issue?
what is alternative for TextInput
?
Upvotes: 2
Views: 1261
Reputation: 29488
Just replace the text with some function of the original string, e.g. textinput.text = ''.join('something ', textinput.text.replace('a', 'b'), ' and something else')
.
Upvotes: 1