简体   繁体   中英

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

I want when this image in my python file is pushed, I want to use the on_touch_down function instead the on_release function. if anyone could be of any assistance I would appreciate it.

    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)

Thanks for future assistance

使用on_press而不是on_release

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM