• <small id='KcFhx'></small><noframes id='KcFhx'>

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

        <tfoot id='KcFhx'></tfoot>

        • <bdo id='KcFhx'></bdo><ul id='KcFhx'></ul>

      1. <legend id='KcFhx'><style id='KcFhx'><dir id='KcFhx'><q id='KcFhx'></q></dir></style></legend>

        kivy:使小部件对单击和双击的反应不同

        时间:2023-10-10

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

            • <small id='mn1cA'></small><noframes id='mn1cA'>

              <tfoot id='mn1cA'></tfoot>
              <legend id='mn1cA'><style id='mn1cA'><dir id='mn1cA'><q id='mn1cA'></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:使小部件对单击和双击的反应不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Kivy 和 Matplotlib 试图更新按钮回调的情节 下一篇:在 Kivy 中使用和移动小部件/按钮

                  相关文章

                  最新文章

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

                      <tfoot id='fB3Vc'></tfoot>

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