excuse my noobness as I'm new to learning Python. I'm currently doing a very simple GUI using the Tkinter library. It is basically a LabelFrame on the top part, with some other widgets inside of it, and below it on the bottom part, a Treeview to display some data.
As it can be seen when running the code,(can't add images to my posts yet), the background of the main root window is set to 'CyanBlue'.
How can I make it to have an image instead of a color, with the all the widgets on the main window overlapping on top of it?
I attach some code for reference. Thank you very much in advance.
from tkinter import *
from tkinter import ttk
import tkcalendar
window = Tk()
wind = window
#HERE I SET THE BG /// WANT AN IMAGE INSTEAD OF COLOR
wind.config(bg = 'LightCyan2')
#Create a LabelFrame
frame = LabelFrame(wind)
frame.grid(row = 0,column = 0, columnspan = 7, pady = 20, padx = 20)
#Date FROM input
Label(frame, text = "From Date: ", font = "Cambria 12 bold" ).grid(row = 1, column = 0, padx = 10
,sticky = "e")
datefrom = tkcalendar.DateEntry(frame, locale = 'en_US', date_pattern ="yyyy-mm-dd")
datefrom.grid(row = 1, column = 1, columnspan = 6, padx = (0,20),pady = 5, sticky = W+E)
#Button add product
b = Button(frame, text = 'Consult Database', font ="Bahnschrift 12 bold",height = 2 ,width = 5, bg =
'DarkOliveGreen1')
b.grid(row = 7, columnspan = 7, padx = 10, pady = 5,sticky = W + E)
####TREEVIEW
tree = ttk.Treeview(selectmode = "extended", height = 10 , columns = ('#1','#2','#3','#4')) #Colum #0
is always implied/ its the column icon/ the one that later becomes the Label Text
tree.grid(row = 8, column = 0, columnspan = 4)
window.mainloop()