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

  • <legend id='tYQy9'><style id='tYQy9'><dir id='tYQy9'><q id='tYQy9'></q></dir></style></legend>

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

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

        僅使用 kv 文件在 kivy 中創建 DropDown

        Creating DropDown in kivy with only kv file(僅使用 kv 文件在 kivy 中創建 DropDown)

      3. <small id='aFNf9'></small><noframes id='aFNf9'>

          <bdo id='aFNf9'></bdo><ul id='aFNf9'></ul>
            <tbody id='aFNf9'></tbody>
          <legend id='aFNf9'><style id='aFNf9'><dir id='aFNf9'><q id='aFNf9'></q></dir></style></legend>

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

                • 本文介紹了僅使用 kv 文件在 kivy 中創建 DropDown的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想使用 DropDown 類獲得一個簡單的組合框,例如小部件.我可以使用 python 代碼來完成,但是否可以只使用 kv 語言?

                  I wanted to get a simple combo box like widget using the DropDown class. I can do it using python code, but is it possible using just kv language?

                  我嘗試了以下方法.這是我的python代碼:

                  I tried the following. Here's my python code:

                  class CustomDropDown(DropDown):
                     pass
                  
                  class MainForm(BoxLayout):
                      pass
                  
                  class MainApp(App):
                      def build(self):
                          self.dropdown = CustomDropDown()
                          self.mainForm = MainForm()
                          return self.mainForm
                      def do_something(self):
                          self.dropdown.open(self.mainForm)
                  
                  MainApp().run()
                  

                  這是 kv 文件:

                  <MainForm>:
                      Button:
                          text: 'Press'
                          size_hint: [None,None]
                          height: '40dp'
                          on_release: app.do_something()
                  <CustomDropDown>:
                      Button:
                          text: 'First Item'
                      Label:
                          text: 'Disabled item'
                      Button:
                          text: 'Second Item'
                  

                  但這不起作用.你能建議點什么嗎?任何幫助表示贊賞.

                  But this is not working. Can you please suggest something? Any help is appreciated.

                  推薦答案

                  是的,可以使用kivy語言.

                  Yes, it's possible using kivy language.

                  您可以閱讀 DropDownList 或 Spinner 通過這些鏈接.此外,如果您想了解更多關于他們的工作,您可能需要查看此 kivy-showcase的鏈接

                  You can read about DropDownList or Spinner through these links. And also if you want to know more on their working, you might want to check this link for kivy-showcase

                  我認為代碼是不言自明的.(on_select 方法)

                  I think the code is self explanatory.(on_select method)

                  這是 main.py 文件

                  This is the main.py file

                  from kivy.app import App
                  from kivy.uix.dropdown import DropDown
                  from kivy.uix.boxlayout import BoxLayout
                  
                  class CustomDropDown(BoxLayout):
                      pass
                  
                  class MainApp(App):
                      def build(self):
                          return CustomDropDown()
                  if __name__=='__main__':
                      MainApp().run()
                  

                  這是main.kv文件

                  This is the main.kv file

                  <CustomDropDown>:
                  
                      Button:
                          id: btn
                          text: 'Press'
                          on_release: dropdown.open(self)
                          size_hint_y: None
                          height: '48dp'
                  
                      DropDown:
                  
                          id: dropdown
                          on_parent: self.dismiss()
                          on_select: btn.text = '{}'.format(args[1])
                  
                          Button:
                              text: 'First Item'
                              size_hint_y: None
                              height: '48dp'
                              on_release: dropdown.select('First Item')
                  
                          Label:
                              text: 'Second Item'
                              size_hint_y: None
                              height: '48dp'
                  
                          Button:
                              text: 'Third Item'
                              size_hint_y: None
                              height: '48dp'
                              on_release: dropdown.select('Third Item')
                  

                  這篇關于僅使用 kv 文件在 kivy 中創建 DropDown的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                  Get current location during app launch(在應用啟動期間獲取當前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)

                    <bdo id='B42JY'></bdo><ul id='B42JY'></ul>

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

                          <tbody id='B42JY'></tbody>

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

                            <legend id='B42JY'><style id='B42JY'><dir id='B42JY'><q id='B42JY'></q></dir></style></legend>
                          • 主站蜘蛛池模板: 中国一级特黄毛片大片 | 日韩精品久久久久久 | 免费黄色av | 欧美激情a∨在线视频播放 成人免费共享视频 | 日韩在线国产 | 精品欧美一区二区三区久久久 | 欧美亚洲国产一区二区三区 | 一区二区在线 | 91久久精品一区二区二区 | 激情五月婷婷在线 | 国产免费拔擦拔擦8x高清 | 人人爱干 | 国产精品视频一区二区三区不卡 | 亚洲一区国产精品 | 在线免费观看日本视频 | 日本一区二区三区免费观看 | www.天堂av.com | 91亚洲国产成人久久精品网站 | 国产成人精品一区二区三区四区 | 成人在线小视频 | 中文字幕在线视频精品 | 99pao成人国产永久免费视频 | 精品成人av| 亚洲综合在线视频 | 日韩一二区在线观看 | 美女天堂 | 青草久久免费视频 | 久久久久久久久精 | 中文字幕在线一区二区三区 | 亚洲精品一区二区三区丝袜 | 日批免费在线观看 | 精品国产91 | 五月婷婷丁香 | 欧美精选一区二区 | 丁香久久| 国产成人免费视频网站高清观看视频 | 欧美日韩国产一区二区 | 欧美极品视频 | 久久久久久久久久久久久九 | 亚洲精品一区二区在线观看 | 亚洲精品一区二三区不卡 |