<tfoot id='F9IWI'></tfoot>

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

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

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

  1. <legend id='F9IWI'><style id='F9IWI'><dir id='F9IWI'><q id='F9IWI'></q></dir></style></legend>
    1. 如何隐藏主窗口标题栏并在 kivy 框架中放置透明

      时间:2023-10-09
      <legend id='z5jCh'><style id='z5jCh'><dir id='z5jCh'><q id='z5jCh'></q></dir></style></legend>

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

                  <tbody id='z5jCh'></tbody>

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

              • 本文介绍了如何隐藏主窗口标题栏并在 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 框架中放置透明背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

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

                相关文章

                最新文章

                  <bdo id='PFBFB'></bdo><ul id='PFBFB'></ul>
                <legend id='PFBFB'><style id='PFBFB'><dir id='PFBFB'><q id='PFBFB'></q></dir></style></legend>
              • <small id='PFBFB'></small><noframes id='PFBFB'>

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

                    <tfoot id='PFBFB'></tfoot>