Answers for "tkinter change title"

6

change tkinter window name

windowName.title('Window Title')

#Example
import tkinter
window = tkinter.Tk()
window.title('My Title')
Posted by: Guest on April-13-2020
1

set icon title tkinter

# my problme was that, i didnt know that the image format must be .ico
# you can convert your images in https://convertico.com/ and then:

from tkinter import *

root = Tk()
root.title('this is program title')
# icon
root.iconbitmap('image_name.ico')

root.mainloop()
Posted by: Guest on September-07-2021
0

how to change the title bar color in tkinter

root = Tk()

def move_window(event):
    root.geometry('+{0}+{1}'.format(event.x_root, event.y_root))

root.overrideredirect(True) # turns off title bar, geometry
root.geometry('400x100+200+200') # set new geometry

# make a frame for the title bar
title_bar = Frame(root, bg='white', relief='raised', bd=2)

# put a close button on the title bar
close_button = Button(title_bar, text='X', command=root.destroy)

# a canvas for the main area of the window
window = Canvas(root, bg='black')

# pack the widgets
title_bar.pack(expand=1, fill=X)
close_button.pack(side=RIGHT)
window.pack(expand=1, fill=BOTH)

# bind title bar motion to the move window function
title_bar.bind('<B1-Motion>', move_window)

root.mainloop()
Posted by: Guest on August-31-2021
1

title tikinter

from tkinter import Tk, Button, Frame, Entry, END

class ABC(Frame):
    def __init__(self,parent=None):
        Frame.__init__(self,parent)
        self.parent = parent
        self.pack()
        ABC.make_widgets(self)

    def make_widgets(self):
        self.root = Tk()
        self.root.title("Simple Prog")
Posted by: Guest on July-10-2020
-2

window title tkinter

ou can remove the title bar by using this line of code
Posted by: Guest on September-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language