久久久久久久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中文字幕网 | 亚洲视频国产视频 | 国产精品久久久久久吹潮日韩动画 | 国产精品日韩高清伦字幕搜索 | 青青青伊人 | 毛片一区二区三区 | 国产美女黄色片 | 中文字幕在线观看第一页 | 日韩视频一区二区三区 | 亚洲女人天堂成人av在线 | 黄色综合 | 国产成人jvid在线播放 | 日韩三级电影在线看 | 亚洲第一免费播放区 | 久久毛片| 精品国产一区二区三区久久 | 一区二区视屏 | 美女在线视频一区二区三区 | 免费99精品国产自在在线 | 中文字幕精品视频 | 日韩一区二区久久 | 欧美男人亚洲天堂 | 九九视频在线观看视频6 | 亚洲欧美国产精品一区二区 | 久久国产精品免费一区二区三区 | 亚洲人精品午夜 | 看片91| 懂色中文一区二区三区在线视频 | 亚洲人成人一区二区在线观看 | 欧美精品一 | 亚洲国产一区二区在线 | 欧美.com | 午夜久久久久久久久久一区二区 |