Unwanted border appearing when scrollable canvas added Unwanted border appearing when scrollable canvas added tkinter tkinter

Unwanted border appearing when scrollable canvas added


As @acw1668 said in the comments,

Add highlightthickness in Canvas(...)

That is the most reasonable solution, and it can be achieved like so:

canvas = Canvas(self, borderwidth=0, highlightthickness = 0)scrollable_frame = Frame(canvas)vsb = Scrollbar(self, orient="vertical", command=canvas.yview)canvas.configure(yscrollcommand=vsb.set, width=450, height=725)vsb.pack(side="right", fill="y")canvas.pack(side="left", fill="both", expand=True)canvas.create_window((0, 0), window=scrollable_frame, anchor="nw")scrollable_frame.bind("<Configure>", lambda e: canvas.configure(scrollregion=canvas.bbox("all")))

Read more about the highlightthickness parameter.

The width of the highlight border. The default is system specific (usually one or two pixels). (highlightThickness/HighlightThickness)

Hope this helps!