Nishanth Sivanandam
Nishanth Sivanandam

Reputation: 31

edit or append text (TextInput class) in kivy

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

Answers (1)

inclement
inclement

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

Related Questions