0

I am coding a program for my dad to use in his office. The window will contain a lot of things. This is why I need a scrollbar. I did it like this video on YT shows: https://www.youtube.com/watch?v=0WafQCaok6g&t=756s

So far, this is my code:

coax = Tk()
coax.title("CYAN - COAX")
coax.iconbitmap("Resources/Icon.ico")
coax.geometry("1100x800")
coax.resizable(False, False)

coax_main_frame = Frame(coax)
coax_main_frame.pack(fill=BOTH, expand=1)

coax_canvas = Canvas(coax_main_frame)
coax_canvas.pack(side=LEFT, fill=BOTH, expand=1)
coax_canvas["bg"] = "white"

coax_scrollbar = ttk.Scrollbar(coax_main_frame, orient=VERTICAL, command=coax_canvas.yview)
coax_scrollbar.pack(side=RIGHT, fill=Y)

coax_canvas.configure(yscrollcommand=coax_scrollbar.set)
coax_canvas.bind("<Configure>", lambda e: coax_canvas.configure(scrollregion=coax_canvas.bbox("all")))

coax_frame = Frame(coax_canvas)

coax_canvas.create_window((0, 0), window=coax_frame, anchor=NW)

coax.mainloop()

I want the background of the whole window to be white, but this code does not fill the whole window with the background I wanted (As you can see in the image. Top line and right line next to scrollbar)

Image

I already tested the scrollbar with a for loop of buttons. It works perfectly fine. But this question is about the background of the window.

Why is there a grey line at the top and right sides. How can I fix it? I already tried multiple ways to color each frame created white, but it did not work. Thank you very much.

Silh0uett3
  • 23
  • 4

0 Answers0