To remove edges/decoration from a window in the TkInter
use the method:
.overrideredirect(True)
Example of use:
from tkinter import Tk, Label, Button
class Exemplo:
def __init__(self, aplicacao):
# Remove as bordas/decoração
aplicacao.overrideredirect(True)
#Cor de fundo como no exemplo da outra resposta
root["bg"] = "gray"
self.label = Label(aplicacao, text="Primeira janela")
self.label.pack()
self.greet_button = Button(aplicacao, text="Chamar função", command=self.minhafuncao)
self.greet_button.pack()
self.close_button = Button(aplicacao, text="Fechar", command=aplicacao.quit)
self.close_button.pack()
def minhafuncao(self):
print("Testando!")
root = Tk()
minhajanela = Exemplo(root)
root.mainloop()
Note: The .overrideredirect(True)
can also be applied in a window/widget specifies.
Then after applying the overrideredirect
you can create your own maximize, minimize or "decorate" (edges) own.
Please, if that’s not possible, let me know.
– Victor Souza