How can I best center a Tkinter window on my display screen?
Not knowing Tkinter that well, here is a somewhat simple minded approach:
from Tkinter import *
def center_window(w=300, h=200):
# get screen width and height
ws = root.winfo_screenwidth()
hs = root.winfo_screenheight()
# calculate position x, y
x = (ws/2) - (w/2)
y = (hs/2) - (h/2)
root.geometry('%dx%d+%d+%d' % (w, h, x, y))
root = Tk()
Edited 6 Years Ago
by vegaseat: changed code frame
hey guys, I already have a database that can add a person with the RFID card number,
I just want a little help of you guys if how can I ...
I'm trying to compare 2 different CSV files, mark those differences respectively, then produce it as an output. However, my code seems to be only reading the last part of ...
I am becoming confused with visual studio v. Vb.net. I am findings hundreds of pieces of code tells me how to connect. Snippets elsewhere that tell me how to access ...