Doch da wurden die Koordinaten des zweiten Sashes nicht eingestellt.
Hab es auf tkinter Syntax umgeschrieben. Auch da ging es nicht. Hab es mit time.sleep, pack bereits vorher probiert, auch mit Laden nach mainloop.
Aber alles ohne Erfolg. Komm einfach nicht drauf, woran es liegen könnte:
Code: Alles auswählen
import tkinter as tk
root = tk.Tk()
paned_window = tk.PanedWindow(root,sashrelief='raised',handlepad='40',sashwidth='8',handlesize='20',showhandle='1',height='200',width='300')
paned_window.add(tk.Label(paned_window,text="Label 1"))
paned_window.add(tk.Label(paned_window,text="Label 2"))
paned_window.add(tk.Label(paned_window,text="Label 3"))
paned_window.sash_place(0,100,1)
paned_window.sash_place(1,200,1)
paned_window.pack()
print(paned_window.sash_coord(0)) # this is correct
print(paned_window.sash_coord(1)) # I get 186 instead of 200 with one computer with the other one I get 171
root.mainloop()