Removing Title bar in Tkinter program

0 votes
I am working on a project using Tkinter library for making a GUI. This GUI will be displayed on a touch screen using raspberry pi 3.

I want to prevent user from exiting or minimising the program. Is there any way to disable or remove the title bar? Or is there a better way to achieve this?
Dec 26, 2018 in Python by ana1504.k
• 5,950 points
536 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
Since you mentioned a raspberry pi I suppose you are using Linux. In this case you can use root.attributes('-type', 'dock') (assuming your Tk instance is called root). This way, your window will have no decoration (so no close or minimize buttons) and will be always on top. If you don't want it always on top, you can use type 'splash' instead. In any case, you will need to use focus_force to be able to get keyboard focus.

import tkinter as tk

root = tk.Tk()
root.attributes('-type', 'dock')
root.geometry('200x200')
tk.Entry(root).pack()
root.focus_force()
root.mainloop()
answered Dec 26, 2018 by SDeb
• 9,460 points
+1 vote

you can remove the title bar by using this line of code

root.overrideredirect(True) # removes title bar

answered Mar 19 by anonymous

Related Questions In Python

0 votes
0 answers

Storing a list of arrays into a CSV file and retrieving it back in a different program

This is the code that I am ...READ MORE

Jun 6, 2018 in Python by ariaholic
• 7,320 points
25 views
0 votes
1 answer

How to get a Mongoengine's object id in a flask program

Check out the documentation, Document.objects is a QuerySet object. You seem to be ...READ MORE

answered Sep 21, 2018 in Python by charlie_brown
• 7,710 points
30 views
0 votes
1 answer

Is there a way of using .lower more effectively in tkinter?

Here is a simple function and some ...READ MORE

answered Sep 25, 2018 in Python by Priyaj
• 56,120 points
71 views
0 votes
1 answer

how to get mongoengine object id in flask program

Check out the documentation, Document.objects is a QuerySet object. You seem to be ...READ MORE

answered Oct 5, 2018 in Python by Priyaj
• 56,120 points
353 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
20 views
0 votes
1 answer

Indentation of Python in Notepad++

To indent the block, select the entire ...READ MORE

answered Sep 18, 2018 in Python by SDeb
• 9,460 points
97 views
0 votes
1 answer

Print C format in Python

For printf- style formatting and special case ...READ MORE

answered Sep 18, 2018 in Python by SDeb
• 9,460 points
26 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.