<small id='AH2li'></small><noframes id='AH2li'>

    1. <tfoot id='AH2li'></tfoot>

        <bdo id='AH2li'></bdo><ul id='AH2li'></ul>
      <i id='AH2li'><tr id='AH2li'><dt id='AH2li'><q id='AH2li'><span id='AH2li'><b id='AH2li'><form id='AH2li'><ins id='AH2li'></ins><ul id='AH2li'></ul><sub id='AH2li'></sub></form><legend id='AH2li'></legend><bdo id='AH2li'><pre id='AH2li'><center id='AH2li'></center></pre></bdo></b><th id='AH2li'></th></span></q></dt></tr></i><div id='AH2li'><tfoot id='AH2li'></tfoot><dl id='AH2li'><fieldset id='AH2li'></fieldset></dl></div>
    2. <legend id='AH2li'><style id='AH2li'><dir id='AH2li'><q id='AH2li'></q></dir></style></legend>
    3. kivy:使小部件对单击和双击的反应不同

      kivy: make widget react different for single- and double-tap(kivy:使小部件对单击和双击的反应不同)

      <i id='8EEnH'><tr id='8EEnH'><dt id='8EEnH'><q id='8EEnH'><span id='8EEnH'><b id='8EEnH'><form id='8EEnH'><ins id='8EEnH'></ins><ul id='8EEnH'></ul><sub id='8EEnH'></sub></form><legend id='8EEnH'></legend><bdo id='8EEnH'><pre id='8EEnH'><center id='8EEnH'></center></pre></bdo></b><th id='8EEnH'></th></span></q></dt></tr></i><div id='8EEnH'><tfoot id='8EEnH'></tfoot><dl id='8EEnH'><fieldset id='8EEnH'></fieldset></dl></div>

            <bdo id='8EEnH'></bdo><ul id='8EEnH'></ul>

            <small id='8EEnH'></small><noframes id='8EEnH'>

          • <tfoot id='8EEnH'></tfoot>

                <tbody id='8EEnH'></tbody>
                <legend id='8EEnH'><style id='8EEnH'><dir id='8EEnH'><q id='8EEnH'></q></dir></style></legend>
              • 本文介绍了kivy:使小部件对单击和双击的反应不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我检测到一个小部件上的双击,如 kivy 文档中所述.如何以一种好的方式实现单击和双击的不同反应?

                I detect a double-tap on a widget like described in the kivy doc. How can i realize different reaction for single- and double-tap in a good way?

                def on_touch_down(self, touch):
                    if self.collide_point(*touch.pos):
                        if touch.is_double_tap:
                            print('here start function B (but not function A in advance!)')
                        else:
                            print('here start function A')
                    return super(MyLabel, self).on_touch_down(touch)
                

                推荐答案

                我会看看这个:https://groups.google.com/forum/#!topic/kivy-users/slYzx9uZ39M看起来您可以设置一个点击等待期,等待在第一次点击后查看您是否要再次点击.希望这可以帮助.希望我知道更多:P

                I would check this out: https://groups.google.com/forum/#!topic/kivy-users/slYzx9uZ39M it looks like you can set a tap wait period where it waits to see if you are going to tap again after the first tap. Hope this helps. Wish I knew more :P

                这篇关于kivy:使小部件对单击和双击的反应不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                Centering an object in Kivy(在 Kivy 中将对象居中)
                How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)
                      <i id='uJfSz'><tr id='uJfSz'><dt id='uJfSz'><q id='uJfSz'><span id='uJfSz'><b id='uJfSz'><form id='uJfSz'><ins id='uJfSz'></ins><ul id='uJfSz'></ul><sub id='uJfSz'></sub></form><legend id='uJfSz'></legend><bdo id='uJfSz'><pre id='uJfSz'><center id='uJfSz'></center></pre></bdo></b><th id='uJfSz'></th></span></q></dt></tr></i><div id='uJfSz'><tfoot id='uJfSz'></tfoot><dl id='uJfSz'><fieldset id='uJfSz'></fieldset></dl></div>

                      <small id='uJfSz'></small><noframes id='uJfSz'>

                      <tfoot id='uJfSz'></tfoot>
                          <tbody id='uJfSz'></tbody>
                          <bdo id='uJfSz'></bdo><ul id='uJfSz'></ul>
                        • <legend id='uJfSz'><style id='uJfSz'><dir id='uJfSz'><q id='uJfSz'></q></dir></style></legend>