tkinter centre a button on 1920x1080 1

tkinter centre a button on 1920×1080

x = 1920/2 - (5 + 35*width/10)

Here is what the above code is Doing:
1. We’re creating a variable called “x” and setting it equal to the value of 1920/2 – (5 + 35*width/10).
2. We’re creating a variable called “y” and setting it equal to the value of 1080/2 – (5 + 35*height/10).
3. We’re creating a variable called “width” and setting it equal to the value of the width of the image.
4. We’re creating a variable called “height” and setting it equal to the value of the height of the image.
5. We’re creating a variable called “img” and setting it equal to the value of the image.

Similar Posts