Home > database >  Window not fully filled with specific background color - tkinter
Window not fully filled with specific background color - tkinter

Time:10-16

Recently i've been trying to make a simple GUI with tkinter in python but for some reason the background color doesn't fully fill the window with the specific color

eg:

enter image description here

How do i fill all the sides?

Any replies are greatly appreciated ;-)

CodePudding user response:

First of all, you need to also attach a minimal reproducible example. Nevertheless, I think you have put a canvas with the colour you want and expanded it to 1.

Canvases in Tkinter always have a border like thing. Rather you can use a frame with the same colour (instead of the canvas) and the border will disappear. The other option is to configure your root to have its own colour like such:

root.config(bg='red')

Either way, you will have to then delete your canvas and place its widgets into either the frame or the root itself.

If this works, please accept this answer. Hope it was helpful. Thank you!

  • Related