I guess I didn't quite understand how tk.Frame works, but I couldn't find a documentation that would help me understand what is happening:
I want to create a GUI with Tkinter and I want to use frames to distribute the available space to all its groups of elements. For simplicity, I want a label, below a frame containing two buttons and another frame with a progressbar.
import tkinter as tk
from tkinter import ttk
window = tk.Tk()
window.geometry()
lbl_1 = tk.Label(master = window, text='One Ring').pack()
frm_A = tk.Frame(master=window).pack()
btn_2 = tk.Button(master=frm_A, text='rule them').pack()
btn_3 = tk.Button(master=frm_A, text='find them').pack()
frm_B = tk.Frame(master=window).pack()
pb_4 = ttk.Progressbar(
master=frm_B,
orient= 'horizontal',
mode= 'determinate',
length= 300
).pack()
lbl_5 = tk.Label(master=frm_B, text='forever binding 0%').pack()
window.mainloop()
Which oviously packs all widgets under each other
Instead I want the two buttons to be next to each other rather than below each other, but if I change their pack commands to:
btn_2 = tk.Button(master=frm_A, text='rule them').pack(side=tk.LEFT)
btn_3 = tk.Button(master=frm_A, text='find them').pack(side=tk.RIGHT)
The buttons will instead be arranged on the sides of the label and the progress-bar-frame
BONUS
Adding to my confusion: I tried to give the frame set sizes and a background color to see where they actually are by adjusting frm_B:
frm_B = tk.Frame(master=window,bg = 'black', width=150, height=150).pack()
But instead it just packed a the frame without anything inside of it next to its supposed content