def InputComp(Mainframe):
Tk.destroy(Mainframe)
InputCompet = Frame(Main , width = 600 , height = 600)
InputCompet.config(bg = 'grey')
Firstname=Label(InputCompet,text='FirstName',bg='grey').grid(row=0,column = 0)
FirstnameInput = Entry(InputCompet).grid(row = 0 , column = 10)
Secondname = Label(InputCompet , text = 'Surname',bg = 'grey').grid(row = 2 ,
column = 0)
SecondnameInput = Entry(InputCompet).grid(row = 2 , column = 10)
InputCompet.grid(row = 0 , column = 0)
每次更改.grids中的行和列时,它都不会更改位置,除非另一个小部件位于它后面的行或列中,但在那种情况下,它仅将我移动一个行/列