Here you can see the specific features of the label one by one.

Example:

from tkinter import *


window = Tk()
window.title("Access Point")
window.geometry("800x450+500+86")
window.config(bg="#FF6103")

label1 = Label(window, text="Access Point Options", bg="white", fg="red"
                      font=("helvetica", 20,"bold"), width=30,height=7, relief="sunken")
label1.pack(pady=20)

print(label1['font'])       #You Will Know Only the font of Your Label
print(label1['bg'])         # You Will Know Only  the background color of your Label      
print(label1['fg'])          # You Will Know Only the foreground Color or Your Label
window.mainloop()


Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.


Enjoy........

Post a Comment

أحدث أقدم