• <bdo id='26Dq3'></bdo><ul id='26Dq3'></ul>

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

      1. <small id='26Dq3'></small><noframes id='26Dq3'>

        刷新/重新加载 FileChooser

        时间:2023-10-09

        <legend id='BdaFa'><style id='BdaFa'><dir id='BdaFa'><q id='BdaFa'></q></dir></style></legend>
        <tfoot id='BdaFa'></tfoot>

            <tbody id='BdaFa'></tbody>

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

                • <bdo id='BdaFa'></bdo><ul id='BdaFa'></ul>
                • 本文介绍了刷新/重新加载 FileChooser的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  目前我经常使用 FileChooser 并且我没有在 文档.小部件很棒,但是如果有人想刷新显示的文件,则需要从当前目录移动以刷新文件.

                  Currently I'm working with FileChooser a lot and I didn't find any mention of refreshing the widget in the docs. The widget is awesome, but if someone wants to refresh shown files, a movement from current directory is necessary to refresh files.

                  问题是当你有一个 single 目录作为 rootpath 并且里面只有文件时,因此不可能进行这样的移动.

                  The problem is when you have a single directory as a rootpath and inside are only files, therefore no such movement is possible.

                  我的问题是如何刷新小部件,如果我想避免任何浪费的删除/添加 FileChooser 并尽可能缩短 FileChooser 非常嵌套在 kv 文件中.

                  My question was how to refresh the widget if I want to avoid any wasteful removing/adding of FileChooser and do it as short as possible for a FileChooser that is very nested in a kv file.

                  推荐答案

                  我搜索了 filechooser.py 找到了 code 在目录之间的每次移动时触发.考虑到 FileChooserIconViewFileChooserListView 继承自 FileChooserController 的事实,对函数的访问很简单,不需要额外的导入.

                  After I searched filechooser.py I found the code which is triggered on each movement between directories. Giving the fact the FileChooserIconView and FileChooserListView inherit from FileChooserController, the access to the function is simple and no additional imports are required.


                  假设我们有 filechooser = FileChooserIconView():

                  filechooser._update_files() 运行良好,当 FileChooser 嵌套在某处时,使用 id

                  filechooser._update_files() works well and when is FileChooser nested somewhere, it's easy to access it with id

                  如需更多调整,Clock.schedule_interval(filechooser._update_files, t) 可能会对您在合理时间内更新目录内容有所帮助.

                  For more tweaks Clock.schedule_interval(filechooser._update_files, t) may be helpful where you can update your directory content within a reasonable time.

                  (我在这里添加它,因为我没有发现它,但是它可能对某人有用.)

                  (I add it here, because I found no mention of it, however it may be useful to someone.)

                  这篇关于刷新/重新加载 FileChooser的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何取消绑定在 Kivy 语言中自动绑定的属性? 下一篇:如何在 kivy FileChooser Python 中访问所有硬盘

                  相关文章

                  最新文章

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

                    <tfoot id='ovMhi'></tfoot>

                        <bdo id='ovMhi'></bdo><ul id='ovMhi'></ul>
                    1. <small id='ovMhi'></small><noframes id='ovMhi'>