简体   繁体   中英

How do I make my tkinter image pop not show the tkinter option window

I have a simple code that opens an exe. This exe makes a pop-up image using Tkinter but there is an option to delete or minimise the photo. How do I get rid of this option?

在此处输入图片说明

here is my code and here is the TK option I was talking about

[![enter image description here]

and here is the TK option I was talking about在此处输入图片说明

You can try:

CODE_1: where it will show minize, maximize and exit but it will not work

from tkinter import *

window = Tk()
window.title("Grand Canyon")
canvas = Canvas(window, width=500, height=500)
canvas.pack()
#window.overrideredirect(1)
window.attributes('-disabled', True)
window.resizable(0,0)
window.mainloop()

CODE_2: where it will NOT show minize, maximize and exit because it will pack into the top of your window

from tkinter import *

window = Tk()
window.title("Grand Canyon")
canvas = Canvas(window, width=500, height=500)
canvas.pack()
window.overrideredirect(1)
#window.attributes('-disabled', True)
window.resizable(0,0)
window.mainloop()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM