from kivy.app import App from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.uix.textinput import TextInput class Box1(BoxLayout): btnOne = Button() btnTwo = Button() btnCal = Button() txtOne = TextInput() def calc(self, txt): txt.text = "Más" class Box2(BoxLayout): btnOne = Button() btnTwo = Button() btnCal = Button() txtOne = TextInput() def calc(self, txt): txt.text = "Más" class RootBox(BoxLayout): box1 = Box1() box2 = Box2() class TesztApp(App): def build(self): return RootBox() def csinal(self): self.title ='valami' def vissza_csinal(self): self.title ='eredeti' TesztApp().run()