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

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

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

        <legend id='8i5UT'><style id='8i5UT'><dir id='8i5UT'><q id='8i5UT'></q></dir></style></legend>
      1. Kivy Python TextInput 顯示氣泡

        Kivy Python TextInput display Bubble(Kivy Python TextInput 顯示氣泡)
      2. <legend id='rpTgZ'><style id='rpTgZ'><dir id='rpTgZ'><q id='rpTgZ'></q></dir></style></legend>

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

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

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

                    <tbody id='rpTgZ'></tbody>
                  本文介紹了Kivy Python TextInput 顯示氣泡的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  I am trying to display numeric keyboard in bubble for TextInput in Kivy. Is it possible? So far I have:

                  Builder.load_string('''
                  <NumericKeyboard>
                  size_hint: (None, None)
                  size: (160, 120)
                  pos_hint: {'center_x': .5, 'y': .6}
                  BubbleButton:
                      text: 'Cut'
                  BubbleButton:
                      text: 'Copy'
                  BubbleButton:
                      text: 'Paste'
                  ''')
                  
                  class NumericKeyboard(Bubble):
                      pass
                  
                  class CustomTextInput(TextInput):
                  def __init__(self, **kwargs):
                      super(CustomTextInput, self).__init__(**kwargs)
                  
                  def on_focus(self, instance, value):
                      self.bubb = NumericKeyboard()
                      self.add_widget(self.bubb)
                  

                  But the bubble will not display.

                  解決方案

                  Yes, it is possible to display numeric key pad using Kivy Bubble for TextInput widget. Please refer to the example below for details.

                  Note: The text input is not filtered.

                  Example

                  main.py

                  from kivy.app import App
                  from kivy.uix.floatlayout import FloatLayout
                  from kivy.uix.bubble import Bubble, BubbleButton
                  from kivy.uix.label import Label
                  from kivy.properties import ObjectProperty
                  from kivy.lang import Builder
                  
                  
                  class CustomBubbleButton(BubbleButton):
                      pass
                  
                  
                  class NumericKeyboard(Bubble):
                      layout = ObjectProperty(None)
                  
                      def __init__(self, **kwargs):
                          super(NumericKeyboard, self).__init__(**kwargs)
                          self.create_bubble_button()
                  
                      def create_bubble_button(self):
                          numeric_keypad = ['7', '8', '9', '4', '5', '6', '1', '2', '3', '', '0', '.']
                          for x in numeric_keypad:
                              if len(x) == 0:
                                  self.layout.add_widget(Label(text=""))
                              else:
                                  bubb_btn = CustomBubbleButton(text=str(x))
                                  self.layout.add_widget(bubb_btn)
                  
                  
                  class BubbleShowcase(FloatLayout):
                      text_input = ObjectProperty(None)
                  
                      def show_bubble(self, *l):
                          if not hasattr(self, 'bubb'):
                              self.bubb = bubb = NumericKeyboard()
                              self.bubb.arrow_pos = "bottom_mid"
                              self.add_widget(bubb)
                  
                  
                  Builder.load_file("test.kv")
                  
                  
                  class TestBubbleApp(App):
                      title = "Numeric Key Pad - Using Bubble"
                  
                      def build(self):
                          return BubbleShowcase()
                  
                  
                  if __name__ == '__main__':
                      TestBubbleApp().run()
                  

                  test.kv

                  #:kivy 1.10.0
                  
                  <CustomBubbleButton>:
                      on_release:
                          app.root.text_input.text += self.text
                  
                  
                  <NumericKeyboard>:
                      layout: layout
                  
                      size_hint: (None, None)
                      size: (160, 120)
                      pos_hint: {'center_x': .5, 'y': .6}
                  
                      GridLayout:
                          id: layout
                          cols: 3
                  
                  <BubbleShowcase>:
                      text_input: text_input
                  
                      canvas:
                          Color:
                              rgba: 0, 1, 1, 1
                          Rectangle:
                              size: self.width, self.height
                      TextInput:
                          id: text_input
                          pos_hint: {'center_x': .5, 'y': .54}
                          size_hint: (0.2, 0.06)
                          cursor_blink: True
                          font_size: 20
                          multiline: False
                          on_focus:
                              root.show_bubble()
                  

                  Output

                  這篇關(guān)于Kivy Python TextInput 顯示氣泡的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個(gè)在 Python 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動(dòng)更改角色顏色)
                1. <i id='uUkQc'><tr id='uUkQc'><dt id='uUkQc'><q id='uUkQc'><span id='uUkQc'><b id='uUkQc'><form id='uUkQc'><ins id='uUkQc'></ins><ul id='uUkQc'></ul><sub id='uUkQc'></sub></form><legend id='uUkQc'></legend><bdo id='uUkQc'><pre id='uUkQc'><center id='uUkQc'></center></pre></bdo></b><th id='uUkQc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='uUkQc'><tfoot id='uUkQc'></tfoot><dl id='uUkQc'><fieldset id='uUkQc'></fieldset></dl></div>

                    <tbody id='uUkQc'></tbody>

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

                          <bdo id='uUkQc'></bdo><ul id='uUkQc'></ul>
                          <legend id='uUkQc'><style id='uUkQc'><dir id='uUkQc'><q id='uUkQc'></q></dir></style></legend>
                          <tfoot id='uUkQc'></tfoot>

                          • 主站蜘蛛池模板: 日本不卡免费新一二三区 | 午夜在线影院 | 色爱综合网 | 日韩成人免费av | 午夜男人免费视频 | 欧美综合一区二区三区 | 免费啪啪 | 狠狠干五月天 | 日韩在线精品 | 精品国产91乱码一区二区三区 | 国产精品一区二区av | 亚洲精品一 | 欧美无乱码久久久免费午夜一区 | 日韩中文不卡 | 91国内外精品自在线播放 | 九九久久久 | 久久久噜噜噜久久中文字幕色伊伊 | 欧美精品乱码久久久久久按摩 | 最新中文字幕久久 | 日韩av一二三区 | 天天操操| 中文字幕亚洲精品 | 久久精品中文 | 亚洲精品免费在线 | 成人一区精品 | 天天操狠狠操 | 免费看黄色视屏 | 成人免费影院 | 久久亚洲精品国产精品紫薇 | 伊人网伊人 | 久久成人精品视频 | 久久精品视频亚洲 | 中文字幕在线三区 | 亚洲欧美在线一区 | 欧美激情精品久久久久 | av国产精品 | 一区二区三区免费看 | 日韩电影一区 | 小h片免费观看久久久久 | 一级做a爰片久久毛片免费看 | 日韩欧美国产精品一区 |