Updating widgets in kivy (python)

前端 未结 1 963
名媛妹妹
名媛妹妹 2021-01-27 08:01

Can anyone explain to me how you update widgets in kivy? I have a code sample here:

class Game(Widget):
def __init__(self, **kwargs):
    super(Game, self).__in         


        
相关标签:
1条回答
  • 2021-01-27 08:32

    You need to bind actions to the buttons (the documentation has a few examples https://kivy.org/docs/api-kivy.uix.button.html).

    i.e.

    button = Button(text='Play', font_size='20')
    button.bind(on_press = do_something_you_want)
    
    0 讨论(0)
提交回复
热议问题