If  You want To Create  Multiple Line In Label You can Use New Line Same As \n

Syntax:   First Line \n Second Line \n Third Line


Example: 

from tkinter import *

my_window = Tk()
my_window.title("Multiple Line Window")
my_window.geometry("800x300+500+86")
my_window.config(bg="#9400D3")

lbl1 = Label(my_window, bg="#9400D3", text="First Line\n Second Line\n                  Third Line",font=("helvetica", 30, "bold"), fg="#FF7F00")
lbl1.pack()

my_window.mainloop()

# Here: my_window = This is root window.
# bg= Background Color.
# text= Text That Write You.
# Font= That means Write font Type, Font Size, Font style.
# fg= Text Color.

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


Lets enjoy................

Post a Comment

Previous Post Next Post