Python/Tkinter make a custom window
Posted
by
user1435947
on Stack Overflow
See other posts from Stack Overflow
or by user1435947
Published on 2012-06-24T17:31:14Z
Indexed on
2012/06/24
21:16 UTC
Read the original article
Hit count: 194
I want to make a window without the top taskbar (that is movable), so there is only thin outline around the GUI box. I also want to add my own 'X' to the box.
import Tkinter
class Application(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.parent = master
............
def main():
root = Tk()
root.attributes('-fullscreen', True)
root.geometry('500x250+500+200')
app = Application(root)
app.parent.configure(background = 'gray32')
root.resizable(width=FALSE, height=FALSE)
app.mainloop()
main()
I tried forcing the box to resize after going into fullscreen to remove the taskbar, though box is no longer movable. Any suggestions?
[I have seen this thread: Python/Tkinter: Removing/disabling a resizable window's maximize button under Windows
The -toolwindow attribute didn't work for me, maybe because I use linux...]
© Stack Overflow or respective owner