[Tkinter-discuss] Toplevel background

johnmc johnmc at velseis.com
Tue Sep 6 19:54:12 EDT 2016


On Tue, 6 Sep 2016 07:41:41 +0000, Vasilis Vlachoudis wrote
> Hi all,
> 
> I have a window which I make full screen with the option
> 
> tk = Tk()
> tk.attributes("-fullscreen", True)
> c = Canvas(tk, background="Black")
> c.pack(expand=YES, fill=BOTH, padx=0, pady=0)
> 
> and displays a full screen "Black" canvas. despite
> I h ave padx=pady=0 I always get 1 pixel White frame all around.
> I believe that it comes from the toplevel window. How can I remove this frame
> or change its color to black
> 
> Thanks in advance
> Vasilis


Hi Vasilis,

the 1 pixel white frame is coming from the canvas widget being in focus.

Simply change to :

c = Canvas(tk, background="Black", highlightthickness=0)

Regards,

John



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Tkinter-discuss mailing list