Remove automatic gap between gridded python Tkinter widgets

后端 未结 1 662
情话喂你
情话喂你 2021-01-23 17:34

I\'m using python2 on Windows. When I run the followig code, I get a gap between the two canvas (see picture below), although there is no padding specified when I grid them. Is

相关标签:
1条回答
  • 2021-01-23 18:04

    You need to set highlightthickness to zero as well.

    self.c1 = tk.Canvas(..., highlightthickness=0)
    

    From the canvas page of effbot highlightthickness explained as:

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

    0 讨论(0)
提交回复
热议问题