The other 2 answers are really good - I thought I would add an example. Personally, I don't like to use .pack - I like to place things instead like this: self.set_label_logpage.place(x=175, y=100)
Example code:
faultlogframe_logs = tk.Label(self, textvariable=logging_screen_label, font=Roboto_Normal_Font, height=180, width=400, background='white', foreground='black') faultlogframe_logs.place(x=605, y=600) self.scrollbar = Scrollbar(self, orient=VERTICAL, elementborderwidth=4, width=32) self.scrollbar.pack(pady=60,padx=0, ipady=4, ipadx=4, side=RIGHT, fill=Y) self.scrollbar_y = Scrollbar(self, orient=HORIZONTAL, width=12, takefocus=1) self.scrollbar_y.pack(expand=TRUE, ipady=9, ipadx=9, padx=0, pady=0, side=BOTTOM, fill=X, anchor=S) self.set_label_logpage = tk.Listbox(self, yscrollcommand=self.scrollbar.set, xscrollcommand=self.scrollbar_y.set) self.set_label_logpage.config(font=Roboto_Normal_Font, background='white', foreground='black', height=16, width=55) #textvariable=self.label_to_display_log self.set_label_logpage.place(x=175, y=100) self.scrollbar_y.config(command=self.set_label_logpage.xview) self.scrollbar.config(command=self.set_label_logpage.yview)
root.geometry("200x100")you're overruling any size requirements inside that. That is also why you can see the scrollbar when the window is expanded, provided that you have large enough environment. Comment it out to see what happens.