In this video video I’ll show you how to remove the Titlebar from your Kivy Apps.
We’ll remove the title bar and I’ll also show you how to position the app on the screen programatically using Config()
#kivy #codemy
Python Code: no_title.py
GitHub Code: no_title.py
from kivy.config import Config Config.set('graphics', 'position', 'custom') Config.set('graphics', 'left', -1700) Config.set('graphics', 'top', 100) from kivy.lang import Builder from kivymd.app import MDApp from kivy.core.window import Window class MainApp(MDApp): def build(self): Window.borderless = True self.theme_cls.theme_style = "Dark" self.theme_cls.primary_palette = "BlueGray" return Builder.load_file('no_title.kv') MainApp().run()
Kivy Design Code: no_title.kv
GitHub Code: no_title.kv
MDFloatLayout: BoxLayout: orientation: "vertical" size: root.width, root.height Label: text_size: self.size halign: "center" valign: "middle" text: "Click the Button To Close The App" font_size: 32 Button: size_hint: (1, .5) font_size: 32 text: "Close App" on_press: app.stop()
Add comment