【问题标题】:I want to implement the on_touch_down function when a pick is pressed, but don't know how to implement it我想在按下选择时实现 on_touch_down 功能,但不知道如何实现
【发布时间】:2020-04-24 03:06:02
【问题描述】:

我希望当我的 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)

感谢您以后的帮助

【问题讨论】:

    标签: python kivy


    【解决方案1】:

    使用on_press 代替on_release。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-15
      • 1970-01-01
      • 2019-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多