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()
		

			

John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of the first dot com boom. After that he developed the award-winning Submission-Spider search engine submission software that's been used by over 3 million individuals, businesses, and governments in over 42 countries. He's written several Amazon #1 best selling books on coding, and runs a popular Youtube coding channel.

View all posts

Add comment

Your email address will not be published. Required fields are marked *

John Elder