Opaque text with transparent background in wxpython - python

In wxpython, you can change the transparency of a frame using 'SetTransparent()' function.
There is a sample app that shows the use of transparent frames here. However, the text also fades as the transparency changes (predictably). Is it possible to make it so the text always remains opaque while the background changes transparency?

Related

How to change property of a certain area on a widget?

Say I have an opaque window for the user to click and drag on, creating a selection rectangle. Is it possible to make just that rectangular area transparent, leaving the rest of the window opaque? Kind of like this image. The black being the opaque part and the white being the transparent part. All part of the same widget.
Edit: Transparent as in being able to see behind the window.

How do I remove all background color in python tkinter

I think the background color is the issue, however, it might not be. I am trying to make the background of the frame and canvas image so that you can see the text before it is covered by the rounded side.
Here is an image of what I currently have:
http://imgur.com/FIujzHM
There are other spacing issues, but I am focusing on the color of the background needing to be transparent.
Thank you for any help.
You can't...
Configure tkinter/ttk widgets with transparent backgrounds, ttk frame background colors?
After a couple hours of looking stuff up I figured out it is impossible.

How to create a Label widget with a transparent background using tkinter?

I wanted to create an app which has an image as its background. But when I add a Label over the image, the label had a white background.
Is there a way to set the Label widget's background color to 'transparent'?
I'm not aware of a way to make Label backgrounds transparent. One alternative is to use a Canvas widget as the base for the whole thing, then use the create_image method to add the background image, and create_text to make the text labels. It will be a bit more work, but the text should render without a background on top of the image. (Admittedly I have very little experience with the Canvas widget, so I'm speaking more from theory than experience, but it's worth a try.)
If you don't have a good Tkinter reference, I highly recommend this one made by New Mexico Tech. It's available as a downloadable PDF as well.

Give wx.StaticBitmap a transparent background? wxpython

I have an image that has a white background, how can I make this background invisible?
Its in a wx.StaticBitmap
wx.StaticBitmap(self, bitmap=wx.Bitmap('images/myimage.png'),pos=(0,0))
By invisible, I assume you mean transparent so that whatever is behind the image shines through.
This is not a function of widgets, but whatever you use to edit your image. You don't say!
I use microsoft visual studio. Here's a screenshot. Notice how the background, shown in a sort of blue-green in the editor - this will show up as transparent, which you can see happening in the column showing the fianl appearances.

Problem with saving image

I have a problem with saving an image. I have following part of code:
self.canvas.postscript(file = filename, colormode = "color")
It works good, but when I set background color in canvas constructor (f.e. bg='red'),
finally image doesn't have this background color. It is still white.
Could anybody help me ?
Sounds like you're using Tkinter: is that right?
I believe the problem is that the bg argument is a general property shared by all widgets. It's really a part of how the widget is drawn on the screen and not a part of the image you're constructing in your canvas. I think the easiest thing for you to do is to draw a red box in your canvas for your background - that will then be included as part of the image saved in your postscript file.

Categories

Resources