Captuar properties of a dynamically added Kivy boot

Asked

Viewed 108 times

1

I have a problem, I have an app created in Python and Kivy that has a screen that as soon as it is accessed creates some buttons dynamically. I would like to know how to capture the text of the button that was clicked.

Python:

def on_enter(self):
    lista_series =[1,2,3,4,5,6,7,8]
    for i in lista_series:
        self.ids.grid.add_widget(Button(text=str(i)))

By clicking any button, I would like to return the text of the button clicked.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.