久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='PzScr'></tfoot>

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

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

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

        Kivy:將小部件放在前面

        Kivy: Bring widget to front(Kivy:將小部件放在前面)

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

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

                    <tbody id='PjhIc'></tbody>

                  <tfoot id='PjhIc'></tfoot>
                  本文介紹了Kivy:將小部件放在前面的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  ActionBar 中的圖像重疊Toolbar.(工具欄

                  解決方案

                  你應該調用 add_widget()remove_widget() 而不是從 self (這是您的 ActionButton),但來自層次結構中較高的對象.您可以存儲對 ActionBar 父級的引用或僅使用 Window 對象本身:

                  from kivy.core.window 導入窗口# ...類 MyActionButton(ActionButton):# ...def close_tooltip(self, *args):Window.remove_widget(self.tooltip)def display_tooltip(self, *args):Window.add_widget(self.tooltip)

                  請注意,這可能會更改工具提示小部件的計算大小.

                  我更新了參考答案.

                  Images in ActionBar overlap Toolbar. (Toolbar is Bubble with Label)
                  My code is based on this answer.

                  Example for ActionBar button:

                  TooltipButton:
                      icon: 'images/32/quit.png'
                      text: _('Quit')
                      on_press: quit()
                  

                  TooltipButton class:

                  class TooltipButton(ActionButton):
                      tooltip = Tooltip()
                  
                      def __init__(self, **kwargs):
                          Window.bind(mouse_pos=self.on_mouse_pos)
                          super(ActionButton, self).__init__(**kwargs)
                  
                      def on_mouse_pos(self, *args):
                          if not self.get_root_window():
                              return
                          pos = args[1]
                          self.tooltip.pos = pos
                          Clock.unschedule(self.display_tooltip)  # cancel scheduled event since I moved the cursor
                          self.close_tooltip()  # close if it's opened
                          if self.collide_point(*self.to_widget(*pos)):
                              Clock.schedule_once(self.display_tooltip, 1)
                  
                      def close_tooltip(self, *args):
                          self.remove_widget(self.tooltip)
                  
                      def display_tooltip(self, *args):
                          self.tooltip.tip.text = self.text
                          self.add_widget(self.tooltip)
                  

                  Tooltip rule (superclass is Bubble):

                  <Tooltip>:
                      tip: tip
                      Label:
                          id: tip
                          text_size: self.size
                          halign: 'center'
                          text: 'Tip'
                  

                  解決方案

                  You should call add_widget() and remove_widget() not from self (which is your ActionButton) but from an object that is higher in the hierarchy. You can store a reference to a parent of ActionBar or just use Window object itself:

                  from kivy.core.window import Window
                  
                  # ...
                  
                  class MyActionButton(ActionButton):
                      # ...
                  
                      def close_tooltip(self, *args):
                          Window.remove_widget(self.tooltip)
                  
                      def display_tooltip(self, *args):
                          Window.add_widget(self.tooltip)
                  

                  Note that this will probably change the computed size of your tooltip widget.

                  I updated referenced answer.

                  這篇關于Kivy:將小部件放在前面的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                1. <tfoot id='SvDqN'></tfoot>

                2. <i id='SvDqN'><tr id='SvDqN'><dt id='SvDqN'><q id='SvDqN'><span id='SvDqN'><b id='SvDqN'><form id='SvDqN'><ins id='SvDqN'></ins><ul id='SvDqN'></ul><sub id='SvDqN'></sub></form><legend id='SvDqN'></legend><bdo id='SvDqN'><pre id='SvDqN'><center id='SvDqN'></center></pre></bdo></b><th id='SvDqN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='SvDqN'><tfoot id='SvDqN'></tfoot><dl id='SvDqN'><fieldset id='SvDqN'></fieldset></dl></div>

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

                    <tbody id='SvDqN'></tbody>

                    <legend id='SvDqN'><style id='SvDqN'><dir id='SvDqN'><q id='SvDqN'></q></dir></style></legend>
                    • <bdo id='SvDqN'></bdo><ul id='SvDqN'></ul>

                            主站蜘蛛池模板: 国产精彩视频在线观看 | 人人人人干 | 欧美日韩国产在线 | 色婷婷久久综合 | 久久成人精品视频 | 在线91 | 欧美国产亚洲一区二区 | 中文字幕蜜臀av | 福利精品 | 欧美 日韩 亚洲91麻豆精品 | 粉嫩国产精品一区二区在线观看 | 国产成人精品综合 | 亚洲91精品 | 免费网站国产 | 欧美精品99 | 成人动慢 | 91国内产香蕉 | 97国产在线视频 | 日韩久久久久 | 亚洲永久 | 久久亚洲视频网 | 国产色视频网站 | 亚洲国产成人av好男人在线观看 | 亚洲一区二区久久 | 日日干日日射 | 久久亚洲天堂 | 欧美一区二区三区 | 久久国产精品久久 | 黄色小视频大全 | 久久国产综合 | 日韩伦理一区二区三区 | 欧美一级片在线观看 | 超碰97人人人人人蜜桃 | 中文字幕一区二区三区四区五区 | 国产精品久久久久久久模特 | 国产精品久久久久久二区 | 在线中文字幕视频 | 中文字幕一区二区三区乱码在线 | 丁香一区二区 | 成人午夜电影在线观看 | 深爱激情综合 |