What is correct: widget.rowconfigure or widget.grid_rowconfigure?
问题 When using grid geometry manager. Let's say you have: import tkinter as tk from tkinter import ttk root = tk.Tk() root.rowconfigure(0, weight=1) root.columnconfigure(0, weight=1) ttk.Button(root, text="Hello World").grid(sticky=tk.NSEW) root.mainloop() The part where you specify the weight of the row/column can also be coded up as: root.grid_rowconfigure(0, weight=1) root.grid_columnconfigure(0, weight=1) For this example, what is correct method: widget.rowconfigure or widget.grid