Problème d'emplacement Tk()
RésoluBonjour. Ma fenetre ne s'ouvre pas au bon endroit. Pouvez vous m'aider? Merci.

On voit une faille sur le coté.
#Importations
from tkinter import *
import time
#Code
Mode = "Intro"
if Mode =="Intro":
FIntro = Tk()
FIntro.overrideredirect(1)
FIntro.geometry("500x250+550+300")
CIntro = Canvas(FIntro, width=500, height=250)
IIntro = PhotoImage(file="C:\Program Files\The Traveler Any Motion\DATA\Ressources\Images\Intro.gif")
LIntro = Label(FIntro, image=IIntro)
LIntro.pack()
FIntro.update()
time.sleep(2)
FIntro.destroy()
Mode = "Menu"
if Mode =="Menu":
F=Tk()
F.title("The Traveler Any Motion")
F.geometry("1600x900")
F.mainloop()
Merci
6 réponses
-
-
Salut,
Etrange, sur Mac ma fenêtre est bien positionnée aussi bien en haut qu'à gauche
-
Ce ne serait que sur Windows alors ?
-
Sur Linux, je ne sais pas.
La bidouille pour Windows :
F.geometry("300x300+-8+0")Mais bon... Vraiment pas terrible
-
Ok merci beaucoup.
-
Une réponse sur SO :
https://stackoverflow.com/questions/64283958/why-is-tkinter-app-not-being-positioned-at-0-0