How to dismiss the Kivy pop-up via a Button?

后端 未结 4 880
耶瑟儿~
耶瑟儿~ 2021-01-28 07:11

I have a pop-up created with Kivy, which contains 2 buttons. User can dismiss the pop-up by pressing outside of the pop-up area (auto_dismiss = True), or by clicking the \"No\"

4条回答
  •  野性不改
    2021-01-28 07:53

    You can solve this issue by a lazy function

    on_press = lambda *args: self.popup_exit.dismiss()
    

    This way, the lookup will occur only when the button is pressed and popup_exit is already in place...

提交回复
热议问题