83
100
9 Answers. Sorted by: 47. It is possible, but it's OS-dependent. This will work in Windows: import Tkinter as tk # Python 2. import tkinter as tk # Python 3. root = tk.Tk() # The image must be stored to Tk or it will be …
  • Safe
  • United States
  • Encrypted
  • 20 yrs old
  • 88 Site Rank
  • Report Card

80
100
Syntax: root.attributes('-alpha',transparency value) To create a transparent background, we need to use the -alpha argument in the attributes () method. The alpha …
  • Safe
  • United States
  • Encrypted
  • 15 yrs old
  • 728 Site Rank
  • Report Card

74
100
win = Tk() #Set the geometry . win.geometry("700x250") #Adding transparent background property . win.wm_attributes('-transparentcolor', '#ab23ff') …
  • Safe
  • Finland
  • Encrypted
  • 18 yrs old
  • 855 Site Rank
  • Report Card

83
100
1 Answer. Sorted by: 25. Here's an example (the PNG file example.png has lots of transparency in different places): from Tkinter import Tk, Frame, Canvas. import …
  • Safe
  • United States
  • Encrypted
  • 20 yrs old
  • 88 Site Rank
  • Report Card

74
100
win = Tk() #Set the geometry . win.geometry("700x350") #Adding transparent background property . win.wm_attributes('-transparentcolor', '#ab23ff') …
  • Safe
  • Finland
  • Encrypted
  • 18 yrs old
  • 855 Site Rank
  • Report Card

74
100
win = Tk() #Set the geometry of window . win.geometry("700x350") #Add a background color to the Main Window . win.config(bg = '#add123') #Create a …
  • Safe
  • Finland
  • Encrypted
  • 18 yrs old
  • 855 Site Rank
  • Report Card

See more