Python Forum
[Tkinter] How can we make the background transparent ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] How can we make the background transparent ?
#1
Hello, i'm french Dance , i'm using "FenetreNomJoueur.attributes("-transparentcolor", "dodger blue")" ( FenetreNomJoueur is my window) on windows that permit convert "dodger blue" in transparent so it's perfect, i've got my background trnasparent.
FenetreNomJoueur = Tk()# on crée une instance d'objet Tk (cette objet s'appel donc fenetrenomjoueur)
FenetreNomJoueur.attributes("-fullscreen", 1)
FenetreNomJoueur.config(bg="dodger blue")
FenetreNomJoueur.attributes("-transparentcolor", "dodger blue")
But when i put my script on Raspberry pi 3 ( Raspbian) this comand didn't work, so i don't get the transparent background, someone can help me please for find the correct command for Raspberry pi 3 ? I think the command -transparentcolor" is only for windows... because the attribute fullscreen works perfectly on Rpi3.

Thanks you
Reply
#2
It is OS dependent, and I haven't found any reference to Raspbian
I found this one for Linux which might work: https://stackoverflow.com/a/48838268
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Transparent window background, but not text on it muzicman0 7 2,876 Feb-02-2024, 01:28 AM
Last Post: Joically
  [Tkinter] COMPLEX! Transparent Canvas Linux AceScottie 7 1,801 Jun-21-2023, 06:44 PM
Last Post: AceScottie
  [Tkinter] Transparent Canvas finndude 8 10,079 Oct-02-2022, 01:48 PM
Last Post: joe_momma
  win32gui not transparent a color, just transparent all the wwindow DQT 0 1,094 Jul-29-2022, 01:40 PM
Last Post: DQT
  Make Label Text background (default color) transparent using tkinter in python barry76 1 23,805 Nov-28-2019, 10:19 AM
Last Post: Larz60+
  set button background with image of window background gray 3 14,448 Oct-18-2017, 08:22 AM
Last Post: gray

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020