I have two screens. On Box I have a button with a name. When I click the button, I want to switch the screen to ChangeText see the name there. Once I click the button the text of Box.name should be the TextInput-text. I can't find a solution.
kv-file
<ChangeText>:
BoxLayout:
TextInput:
id: txt
multiline: False
text: Box.name
Button:
text: "Save"
on_release: Box.name = txt.text
<Box>:
BoxLayout:
Button:
text: root.name
on_press: root.change_text(root.name)
py-file
class ChangeText(Screen):
pass
class Box(Screen):
name = StringProperty("sometext")
def change_text(label):
sm.current = 'changetext'
### ?!?!? ###