Center Toplevel() windows to main CTk() windows #2510
HyperNylium
started this conversation in
Showcase
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently made an app where you could click on an "update" button and a window (Toplevel window) would pop out. But the problem was that I wanted it to be centered on the CTk() window. So, I made this function. Hope you enjoy!
Before we begin, let me showcase what this would even look like:

This is the function by itself:
This is the code I used to make the screenshot above:
If you want more info on the
CenterWindowToDisplay()
function, I'd suggest you look hereYou may use this code however you like :)
Beta Was this translation helpful? Give feedback.
All reactions