英文:
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_touch_down= self.imagechange)
self.add_widget(self.profileimage)
感谢未来的帮助。
英文:
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
答案1
得分: 0
Use on_press
instead of on_release
.
英文:
Use on_press
instead of on_release
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论