def build(self): button = Button(text="Press me!") button.bind(on_release=self.show_dialog) return button