1. <legend id='uKucn'><style id='uKucn'><dir id='uKucn'><q id='uKucn'></q></dir></style></legend>

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

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

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

    1. <tfoot id='uKucn'></tfoot>
    2. 如何隐藏主窗口标题栏并在 kivy 框架中放置透明背景?

      时间:2023-06-07
        <bdo id='IPaiq'></bdo><ul id='IPaiq'></ul>

        1. <tfoot id='IPaiq'></tfoot>

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

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

              • 本文介绍了如何隐藏主窗口标题栏并在 kivy 框架中放置透明背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个小问题,我正在开发一个使用 python kivy gui 框架的小应用程序.我想要的只是隐藏主窗口的标题栏并使背景颜色透明.我在网上搜索了很多,但找不到解决方案.

                I have a small problem and I am working on a small app that uses the python kivy gui framework. All i want is to hide the titlebar of the main window and make the background color transparent. I searched the net intensively but I couldn't find a solution for this.

                有人知道怎么做吗?

                谢谢

                推荐答案

                您可以使用 kivy.config.Config 禁用 bar.将fullscreen设置为fake:

                You can disable bar using kivy.config.Config. Set fullscreen as fake:

                from kivy.config import Config
                Config.set('graphics', 'fullscreen', 'fake')
                
                from kivy.app import App
                from kivy.uix.button import Button
                
                class MyApp(App):
                    def build(self):
                        button = Button(text="Exit", size_hint=(None, None))
                        button.bind(on_press=exit)
                        return button
                
                if __name__ == '__main__':
                    MyApp().run()
                

                您可以在此处找到更多配置选项:http://kivy.org/docs/api-kivy.config.html#available-configuration-tokens 例如,还要改变窗口的位置:

                You can find more configuration options here: http://kivy.org/docs/api-kivy.config.html#available-configuration-tokens For example, to also change position of window:

                from kivy.config import Config
                Config.set('graphics', 'fullscreen', 'fake')
                Config.set('graphics', 'position', 'custom')
                Config.set('graphics', 'top', '300')
                Config.set('graphics', 'left', '300')
                
                from kivy.app import App
                from kivy.uix.button import Button
                
                class MyApp(App):
                    def build(self):
                        button = Button(text="Exit", size_hint=(None, None))
                        button.bind(on_press=exit)
                        return button
                
                if __name__ == '__main__':
                    MyApp().run()
                

                很遗憾,我不知道是否可以添加透明度.

                Unfortunately, I don't know whether it's possible to add transparency.

                这篇关于如何隐藏主窗口标题栏并在 kivy 框架中放置透明背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在 Kivy 中从内存中加载图像 下一篇:基于窗口高度和宽度的 Kivy 缩放文本

                相关文章

                  <bdo id='p8DcV'></bdo><ul id='p8DcV'></ul>
                  <tfoot id='p8DcV'></tfoot>

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

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