Tkinter pack method confusion

后端 未结 3 1492
别跟我提以往
别跟我提以往 2020-12-12 01:43

I cant understand why the pack manager wont let you pack LEFT AND RIGHT below top packed widgets. My expected output of the following code would be

 A
 B
C D         


        
3条回答
  •  忘掉有多难
    2020-12-12 02:32

    tkinter pack is one of the all three geometry managers. it helps to specify the geometry of all tkinter widgets. here is the code example.

    from tkinter import * 
    
    window = Tk()
    
    Label(window,text = "Text").pack()
    
    window.mainloop()
    

    for more info, Refer this tutorial on tkinter pack

提交回复
热议问题