Muhammad Asim :
I have program in which i have made a Bordered label but its bordered is too close to the Text. I want to give spacing between Border and Text of Label. Code is Below.
from tkinter import *
import tkinter as tk
win = Tk()
win.title("Labels")
win.geometry("800x600+50+50")
win.config(bg='white')
label1=Label(win, text="Label with Border.", font=("Calibri",24,"bold"), bg='white', borderwidth=1, relief="solid")
label1.pack(pady=15)
win.mainloop()
Output:
Arun :
Use padx property to adjust the padding in x coordinate
Ex; lab=Label(padx=20) ,will add 20px spacing in left and right side of the label