Hi,
On Thu, 26 May 2016 09:36:16 +0200
Paul Malherbe <[email protected]> wrote:
> You could use canvas to achieve this as per attached snippet.
with a few modifications, your example can be used to actually look like
a desktop wallpaper:
#####################################################
import Tkinter as tk
import ttk
from PIL import Image, ImageTk
root = tk.Tk()
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
root.geometry('%dx%d+0+0' % (w, h))
root.wm_overrideredirect(1)
root.lower()
pilimg = Image.open("example.gif")
rimage = pilimg.resize((w, h), Image.ANTIALIAS)
fimage = ImageTk.PhotoImage(image=rimage)
cnv = tk.Canvas(root)
cnv.create_image(0, 0, image=fimage, anchor="nw", tags="img")
cnv.create_text(200, 100, text="HELLO BABY", font=("Arial", 20, "bold"))
cnv.pack(side="left", fill="both", expand="yes")
root.mainloop()
###################################################
However, as soon as you call something like "pcmanfm --desktop" to get
desktop icons your Tkinter "wallpaper" will be hidden underneath.
Regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
I object to intellect without discipline; I object to power without
constructive purpose.
-- Spock, "The Squire of Gothos", stardate 2124.5
_______________________________________________
Tkinter-discuss mailing list
[email protected]
https://mail.python.org/mailman/listinfo/tkinter-discuss