I was delighted to see that wx.Button now supports bitmaps in python
2.9.x.
I want to use rounded buttons instead of square ones.
My bitmaps are png format, a rounded btn image on a transparent
square background.
When I use wx.button and set a bitmap to it, the button is square with
my image in it.
Is there a way to get rid of the square background or make it
transparent?
I also tried using the wx.lib.buttons' generic bitmap button instead
but also the transparent square background of the native png image
becomes a shade of white when I convert it to bitmap so I can use it
with the button.
In this setting again, what can I do to keep the background
transparent so the button looks rounded.
I tried using a shaped bitmap button, the button looks rounded but
there is still a thin rim around the button that looks like a shade of
white. I want the button to blend with the background panel picture
and so this thin rim makes it stick out.
Anyway to make the button background transparent?
VC
···
On Apr 22, 1:21 pm, VC <napoleon...@gmail.com> wrote:
Hi,
I was delighted to see that wx.Button now supports bitmaps in python
2.9.x.
I want to use rounded buttons instead of square ones.
My bitmaps are png format, a rounded btn image on a transparent
square background.
When I use wx.button and set a bitmap to it, the button is square with
my image in it.
Is there a way to get rid of the square background or make it
transparent?
I also tried using the wx.lib.buttons' generic bitmap button instead
but also the transparent square background of the native png image
becomes a shade of white when I convert it to bitmap so I can use it
with the button.
In this setting again, what can I do to keep the background
transparent so the button looks rounded.
If i get the bitmap size and then set the SBitmapButton sise to bitmap
size[0]-2, and bitmap size[1] -2 i get rid of that rim lol, but i am
still interested to know if there is another way.
Thank you.
if __name__ == "__main__":
app = MyApp()
app.MainLoop()
···
On Apr 22, 4:03 pm, VC <napoleon...@gmail.com> wrote:
On Apr 22, 1:21 pm, VC <napoleon...@gmail.com> wrote:
> Hi,
> I was delighted to see that wx.Button now supports bitmaps in python
> 2.9.x.
> I want to use rounded buttons instead of square ones.
> My bitmaps are png format, a rounded btn image on a transparent
> square background.
> When I use wx.button and set a bitmap to it, the button is square with
> my image in it.
> Is there a way to get rid of the square background or make it
> transparent?
> I also tried using the wx.lib.buttons' generic bitmap button instead
> but also the transparent square background of the native png image
> becomes a shade of white when I convert it to bitmap so I can use it
> with the button.
> In this setting again, what can I do to keep the background
> transparent so the button looks rounded.
> Thank you
> VC
I tried using a shaped bitmap button, the button looks rounded but
there is still a thin rim around the button that looks like a shade of
white. I want the button to blend with the background panel picture
and so this thin rim makes it stick out.
Anyway to make the button background transparent?