Display a label

    lbl_label1 = Label(root, text = "My text")
    lbl_label1.place(x=5, y=370)
Setting properties
//Background
    lbl_label1 = Label(root, text = "My text", bg="white")
//Border
    borderwidth=2, relief="groove"
//Width
    width=20,
//Font
    font=('', 18, 'bold')    #'normal', 'bold', etc

//Using multiple lines to make code easy to read
    lbl_label1 = Label(root,
                       text = "My text",
                       font=('', 18, 'bold'))    #'normal', 'bold', etc
    lbl_label1.place(x=5, y=370)
Update label text
#Make it global
    global lbl_label1

    lbl_label1.configure(text = "New text")
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *