The "best" geometry manager depends on what you want to do; no geometry manager is suitable for all situations. For what you are trying to do in this particular case, the package is probably the best choice. Also note that there may be several "best" in the application. It is quite normal to use both the grid and the package in different parts of your applications. I rarely ever create a GUI where I don't use both the grid and the package. And rarely, I also use the place.
pack differs in that it is placed in separate rows and separate columns. Toolbars, for example, are ideal for using the package, because you want all of your buttons to be left-aligned. a grid, as the name suggests, is best when you want fixed rows and columns. the place is useful in those rare cases when neither the grid nor the package will be done, since this allows you to place widgets in an exact fixed or relative location.
My advice is to split application widgets into groups and use the correct geometry manager for each group. In your case, you have two logical groups: a toolbar at the top and a combination of text and a widget and a scroll at the bottom. So, start with two frames. Since the toolbar is on top and the text widget is below, the package works best.
toolbar = tk.Frame(...) main = tk.Frame(...) toolbar.pack(side="top", fill="x", expand=False) main.pack(side="bottom", fill="both", expand=True)
The above gives you two areas that are easy to change independently.
For a toolbar, a package is again the most natural. In this case, however, you need the buttons on the left, not the top or bottom:
b1 = tk.Button(toolbar, ...) b2 = tk.Button(toolbar, ...) b1.pack(side="left") b2.pack(side="left") ...
Finally, the lower region. In your code example, the scroll bars are not displayed, but I assume that at some point you will want to add them. the grid works well if you use horizontal and vertical scrollbars. I would put them like this:
hsb = tk.Scrollbar(main, ..., orient="horizontal", ...) vsb = tk.Scrollbar(main, ..., orient="vertical", ...) text = tk.Text(main, ...) vsb.grid(row=0, column=1, sticky="ns") hsb.grid(row=1, column=0, sticky="ew") text.grid(row=0, column=0, sticky="nsew") main.grid_rowconfigure(0, weight=1) main.grid_columnconfigure(0, weight=1)
This last part is important - you always need to give weight to at least one row and one column. This indicates the grid whose rows and columns should grow and shrink when the window is resized.