Posts: 8
Threads: 2
Joined: Jan 2023
I'm fairly new (or at least inexperienced) with Python, and this is the first project where I am trying to make a GUI.
What I am trying to accomplish is a window with no title bar that is semi transparent, say like 30% transparent. I have accomplished this with no issue, using both pysimplegui and tkinter. The problem that I am running into is that anything else (such as text) that I add to the window is also transparent. I don't want that. JUST a transparent background. Is this possible?
Any help would be much appreciated.
Posts: 6,800
Threads: 20
Joined: Feb 2020
Jul-01-2023, 11:58 AM
(This post was last modified: Jul-01-2023, 11:58 AM by deanhystad.)
Show what you have tried.
Posts: 12,031
Threads: 485
Joined: Sep 2016
Take a look at pyqtside6
If you want a solution that does not require payment, even for commercial use, see wxpython
Posts: 8
Threads: 2
Joined: Jan 2023
(Jul-01-2023, 11:58 AM)deanhystad Wrote: Show what you have tried.
This is just a quick test that I have been using, but here is code that creates a window that is semi transparent, and the text is also semi transparent.
# Import module
from tkinter import *
# Create object
root = Tk()
# Adjust size
root.geometry("1000x400")
# Create transparent window
root.attributes('-alpha', .8)
root.configure(bg= '#000001')
# Create label
l = Label(root, fg= 'white', bg= '#000001', text = "----SEMI TRANSPARENT TEXT-SHOULD BE 100% OPAQUE----")
l.config(font =("Courier", 24, 'bold'))
l.pack()
# Execute tkinter
root.mainloop()
Posts: 8
Threads: 2
Joined: Jan 2023
(Jul-01-2023, 11:58 AM)Larz60+ Wrote: Take a look at pyqtside6
If you want a solution that does not require payment, even for commercial use, see wxpython
I will, thanks!
Posts: 1
Threads: 0
Joined: Jan 2024
Jan-20-2024, 03:34 PM
(This post was last modified: Jan-21-2024, 11:32 PM by Larz60+.)
Quote:Take a look at pyqtside6
If you want a solution that does not require payment, even for commercial use, see wxpython
A very good idea, I will try it
Larz60+ write Jan-21-2024, 11:32 PM:Removed added url
Posts: 11
Threads: 0
Joined: Nov 2023
(Jul-01-2023, 03:53 AM)muzicman0 Wrote: I'm fairly new (or at least inexperienced) with Python, and this is the first project where I am trying to make a GUI.
What I am trying to accomplish is a window with no title bar that is semi transparent, say like 30% transparent. I have accomplished this with no issue, using both pysimplegui and tkinter. The problem that I am running into is that anything else (such as text) that I add to the window is also transparent. I don't want that. JUST a transparent background. Is this possible?
Any help would be much appreciated.
a short overview of Tkinter and PySimpleGUI from my side:
Tkinter creates a Tkinter window, sets transparency using attributes('-alpha', 0.7), and adds a frame with a non-transparent text label.
If we talk about the PySimpleGUI Set PySimpleGUI theme, Create a layout with a text element, and Create a window with transparent_color and alpha_channel, If you need more specific details or code, feel free to ask!
Posts: 1
Threads: 0
Joined: Feb 2024
Feb-02-2024, 01:28 AM
(This post was last modified: Feb-13-2025, 08:03 AM by buran.)
Did you try it?
buran write Feb-13-2025, 08:03 AM:Spam link removed
Posts: 1
Threads: 0
Joined: Feb 2025
Feb-13-2025, 06:16 AM
(This post was last modified: Feb-13-2025, 08:05 AM by buran.)
(Feb-02-2024, 01:28 AM)Joically Wrote: Did you try it?
Of course. Promising results.
buran write Feb-13-2025, 08:05 AM:Spam link removed
|