<legend id='ysZRb'><style id='ysZRb'><dir id='ysZRb'><q id='ysZRb'></q></dir></style></legend>

<tfoot id='ysZRb'></tfoot>

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

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

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

        Python透明KivyMD导航抽屉

        时间:2023-10-09
        1. <small id='uNw2y'></small><noframes id='uNw2y'>

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

                    <tbody id='uNw2y'></tbody>
                  本文介绍了Python透明KivyMD导航抽屉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试对我的应用(数字规划器)应用一些更改,其中之一是能够在 MDNavigationDrawer 中切换屏幕,但我有两个问题:

                  I'm trying to apply some changes to my app (digital planner), one of which is being able to switch screens within MDNavigationDrawer, but I have two problems:

                  1. 导航.抽屉是透明的.我尝试将其不透明度设置为 1 - 无效.
                  2. 导航.抽屉似乎在下方";屏幕.如果导航上按钮的位置.抽屉和屏幕上的按钮匹配,按下的按钮是屏幕上的那个,而不是导航上的那个.抽屉.

                  MDNavigationDrawer 的外观如下

                  这是我的一些 Kivy 代码:

                  Here's a bit of my Kivy code:

                  BoxLayout:
                      orientation: "vertical"
                  
                      manager: manager
                      nav_drawer: nav_drawer
                  
                      MDToolbar:
                          id: tb
                          type: "top"
                          title: "VPlanner"
                          left_action_items: [["menu", lambda x: nav_drawer.set_state()]]
                          right_action_items: [["settings", lambda x: app.open_settings()]]
                  
                      NavigationLayout:
                          x: tb.height
                      
                          MDNavigationDrawer:
                              id: nav_drawer
                  
                              ContentNavigationDrawer:    
                  
                          ScreenManager:
                              id: manager
                  
                              menu_window: menu_window
                              stats_window: stats_window
                              history_window: history_window
                  
                              MenuWindow:
                                  id: menu_window
                  
                              StatsWindow:
                                  id: stats_window
                  
                              HistoryWindow:
                                  id: history_window
                  
                  
                  <ContentNavigationDrawer>:
                      cols: 1
                      orientation: "vertical"
                  
                      OneLineListItem:
                          text: "Menu"
                  
                          size_hint: 1, None
                          on_release: 
                              app.root.nav_drawer.set_state("close")
                              app.root.manager.current = "menu"
                  
                      OneLineListItem:
                          text: "Statistics"
                  
                          size_hint: 1, None
                          on_release: 
                              app.root.nav_drawer.set_state("close")
                              app.root.manager.current = "stats"
                  
                      OneLineListItem:
                          text: "History"
                  
                          size_hint: 1, None
                          on_release: 
                              app.root.nav_drawer.set_state("close")
                              app.root.manager.current = "history"
                  

                  这是我的一小段 Python 代码:

                  And here's a tiny bit of my Python code:

                  # there were lots of lines in each class representing screens,
                  # so I only left the ContentNavigationDrawer class, which is,
                  # as you already figured it out, supposed to represent content
                  # displayed in the MDNavigationDrawer.
                  
                  
                  class ContentNavigationDrawer(GridLayout):
                      pass
                  

                  提前致谢!

                  推荐答案

                  问题

                  Navigation Drawer 看起来是透明的,因为它被放置在 ScreenManager 之前.

                  MDNavigationDrawer: 放在 ScreenManager:

                  NavigationLayout:
                      x: tb.height
                  
                      ScreenManager:
                          id: manager
                  
                          ...
                          HistoryWindow:
                              id: history_window
                  
                      MDNavigationDrawer:
                          id: nav_drawer
                  
                          ContentNavigationDrawer:
                  

                  输出

                  这篇关于Python透明KivyMD导航抽屉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 Kivy 中更改背景颜色 下一篇:Python/Kivy:我可以在双击标签时调用函数吗

                  相关文章

                  最新文章

                  1. <legend id='MQ41A'><style id='MQ41A'><dir id='MQ41A'><q id='MQ41A'></q></dir></style></legend>
                  2. <tfoot id='MQ41A'></tfoot>

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

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