Nov-10-2021, 08:31 PM
This code makes a button and returns a handle to the button.
submitButton=tk.Button(top,text='Submit',command=submitData(top))This code tells the grid layout in the parent window (top) how it should layout the new button. .grid() returns None.
submitButton.grid(row=rw,column=2,pady=5,sticky=tk.W)When you string the two commands together you get a new button in the right spot, but the value in submitButton is None, the return value of the .grid() calll.