Reputation: 28624
How can I show a window created with Tkinter.Tk() outside visible screen? I need to make it much bigger than the desktop size, and show part of it defined by coordinates.
Upvotes: 2
Views: 1000
Reputation: 43
Another possible way is to insert a frame and resize that, eg:
import tkinter as tk
root = tk.Tk()
frame = Frame(root, width = 1000, height = 1000)
frame.pack()
root.mainloop
The size of your window will then be determined by the frame, although the answer already given works just fine too
Upvotes: 0
Reputation: 369164
Use Tk.geometry
with desired width, height and negative position.
from Tkinter import * # from tkinter import * (In Python 3.x)
root = Tk()
root.geometry('3000x3000+-100+-100')
root.mainloop()
I tested this on Ubuntu 12.04 (gnome) and Window 7. In Ubuntu, it work well. In Windows, negative position works, but width, height higher than resolution ignored.
Upvotes: 4