I’ve seen posts about getting rid of the gray border around BitmapButtons, but I’m getting a black border around a button after it’s been clicked. Is there an easy way to get rid of that?
I do have style=NO_BORDER applied to the buttons, but the black border appears no matter what.
I’ve tried a Refresh() on the panel, Refresh() on the button, but so far no luck.
Attached is a screenshot; on the left, the black border around a button that has been clicked. On the right, a button that has not been clicked.

It would help to know which exact version of wxPython and which exact
operating system you are getting this on.
It would also help to know if you get the same behaviour with the
buttons in the Demo package.
···
On 24/07/2016 11:36, notklaatu@gmail.com wrote:
I've seen posts about getting rid of the gray border around
BitmapButtons, but I'm getting a black border around a button after it's
been clicked. Is there an easy way to get rid of that?
I do have style=NO_BORDER applied to the buttons, but the black border
appears no matter what.
I've tried a Refresh() on the panel, Refresh() on the button, but so far
no luck.
Attached is a screenshot; on the left, the black border around a button
that has been clicked. On the right, a button that has not been clicked.
--
You received this message because you are subscribed to the Google
Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to wxpython-users+unsubscribe@googlegroups.com
<mailto:wxpython-users+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.
wxPython-2.8.12.1
Linux
I didn’t think to try to modify the Demo code; I’ll give that a shot, thanks.
···
On Sunday, July 24, 2016 at 10:36:23 PM UTC+12, notk...@gmail.com wrote:
I’ve seen posts about getting rid of the gray border around BitmapButtons, but I’m getting a black border around a button after it’s been clicked. Is there an easy way to get rid of that?
I do have style=NO_BORDER applied to the buttons, but the black border appears no matter what.
I’ve tried a Refresh() on the panel, Refresh() on the button, but so far no luck.
Attached is a screenshot; on the left, the black border around a button that has been clicked. On the right, a button that has not been clicked.
Mixed results.
Using ‘simple’ from the demo set, I changed the button code to:
btnicon = wx.Image('stop.png').ConvertToBitmap()
btn = wx.BitmapButton(panel, -1, btnicon, pos=(10, 20), style=wx.NO_BORDER)
Launching it, it seemed promising…
But if I click anywhere in the main panel, a block box appears around one button…but not my BitmapButton. So on one hand, it’s an improvement, but on the other hand, no improvement.
If I add style=NO_BORDER to the “fun” button:
same result occurs when panel is clicked:
···
On Thursday, July 28, 2016 at 9:49:06 PM UTC+12, notk...@gmail.com wrote:
wxPython-2.8.12.1
Linux
I didn’t think to try to modify the Demo code; I’ll give that a shot, thanks.
On Sunday, July 24, 2016 at 10:36:23 PM UTC+12, notk...@gmail.com wrote:
I’ve seen posts about getting rid of the gray border around BitmapButtons, but I’m getting a black border around a button after it’s been clicked. Is there an easy way to get rid of that?
I do have style=NO_BORDER applied to the buttons, but the black border appears no matter what.
I’ve tried a Refresh() on the panel, Refresh() on the button, but so far no luck.
Attached is a screenshot; on the left, the black border around a button that has been clicked. On the right, a button that has not been clicked.
OK, I’ve narrowed it down to a local theme on my dev machine. None of my client machines are having this strange black border issue.
The problem was caused by a qt-gtk theme I had applied to my system ; when I changed to a different theme, the black border issue goes away.
Thanks for the help.
···
On Thursday, August 4, 2016 at 6:38:16 PM UTC+12, notk...@gmail.com wrote:
wxPython-2.8.12.1
Linux
I didn’t think to try to modify the Demo code; I’ll give that a shot, thanks.
On Sunday, July 24, 2016 at 10:36:23 PM UTC+12, notk...@gmail.com wrote:
I’ve seen posts about getting rid of the gray border around BitmapButtons, but I’m getting a black border around a button after it’s been clicked. Is there an easy way to get rid of that?
I do have style=NO_BORDER applied to the buttons, but the black border appears no matter what.
I’ve tried a Refresh() on the panel, Refresh() on the button, but so far no luck.
Attached is a screenshot; on the left, the black border around a button that has been clicked. On the right, a button that has not been clicked.
Mixed results.
Using ‘simple’ from the demo set, I changed the button code to:
btnicon = wx.Image('stop.png').ConvertToBitmap()
btn = wx.BitmapButton(panel, -1, btnicon, pos=(10, 20), style=wx.NO_BORDER)
Launching it, it seemed promising…
But if I click anywhere in the main panel, a block box appears around one button…but not my BitmapButton. So on one hand, it’s an improvement, but on the other hand, no improvement.
If I add style=NO_BORDER to the “fun” button:
same result occurs when panel is clicked:
On Thursday, July 28, 2016 at 9:49:06 PM UTC+12, notk...@gmail.com wrote: