0

I have one problem with background in my appication - my text not use root background. My code:

    from tkinter import *
    import os
    import tkinter.scrolledtext as scrolledtext
    
    DIR1= os.path.abspath(os.curdir) + "/"
    
    root = Tk()
    root.iconbitmap("1.ico")
    root.geometry("600x700+690+100")
    root.title("place() method")
    root.title("Test")
    font = PhotoImage(file=DIR1+'7.png')
    label_1 = Label(root, image=font)
    label_1.place(x=0, y=0)
    label_1 = Label(text="""Hello world""", pady=10, font="Arial 14")
    
    Output = scrolledtext.ScrolledText(root, height=20,
                  width=60,
                  bg="light cyan",
                  wrap=WORD)
    
    Display_1 = Button(root,
                       height = 2,
                       width = 50,
                       text="Check DIR",
                       command=lambda: check_dir())
    
    label_1.pack()
    Display_1.pack(side=TOP, pady=(10,10))
    Output.pack()
    mainloop()

But as result have: enter image description here

How to set for text my image=font background? I want to have the text over my background. I tried via option 'compound', but it work only for 'center' position... Maybe you can help me.

acw1668
  • 40,144
  • 5
  • 22
  • 34
Oleksii
  • 1
  • 1

0 Answers0