1

I want to decrease the distance between the lines (3 and 4) in the photo. But both ipady and pady are 0 and the distance is still a lot (i want it smaller).

Code:

labeljdisk = Label(root, text="3\tLaufwerk J\t\t" + filesd['jdisk']['status'], 
                   fg=filesd['jdisk']['color'],background=bg)
labeljdisk.config(font=("Monaco", 13))
labeljdisk.grid(row=1, column=0, padx='5', pady='0', ipady='0', sticky='W')

labelstandby = Label(root, text="4\tStandbymodus\t\t" + filesd['standby']['status'], 
                     fg=filesd['standby']['color'], background=bg)
labelstandby.config(font=("Monaco", 13))
labelstandby.grid(row=2, column=0, padx='5', pady='0', ipady='0', sticky='W')

Photo:

enter image description here

Joel S.
  • 64
  • 7
  • Remove your `\t` in `"3\tLaufwerk J\t\t..."`. Have a look to this [Pretty print data in tkinter Label](https://stackoverflow.com/a/58660344/7414759) – stovfl Nov 21 '19 at 09:06

1 Answers1

2

You can save a few more pixels by setting highlightthickness and borderwidth to zero:

labeljdisk = Label(..., bd=0, highlightthickness=0)
Henry Yik
  • 22,275
  • 4
  • 18
  • 40