簡體   English   中英

我想在按下選擇時實現 on_touch_down 功能,但不知道如何實現它

[英]I want to implement the on_touch_down function when a pick is pressed, but don't know how to implement it

我想當我的 python 文件中的這個圖像被推送時,我想使用 on_touch_down 函數而不是 on_release 函數。 如果有人可以提供任何幫助,我將不勝感激。

    def __init__(self, **kwargs):
        super(ProfileWindow, self).__init__(**kwargs)
        self.profileimage = ImageButton(source= "icons/profilepic.png", pos_hint={"center_x": 0.5, "center_y": 0.65})
        self.profileimage.bind(on_release= self.imagechange)
        self.add_widget(self.profileimage)

感謝未來的幫助

使用on_press而不是on_release

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM