gray border around a regular wx.Button (Windows)

627 views
Skip to first unread message

dhyams

unread,
Mar 8, 2013, 12:43:43 PM3/8/13
to wxpytho...@googlegroups.com
My google-fu has failed to find a solution to this one :(  But surely it must a common problem, if indeed it is a problem.

Under Windows, how do you get rid of the one-pixel wide border around just a regular wx.Button?  I'm trying to draw the button on top of a non-gray background, and it's a bit unsightly.

You can see the same borders in the wx demo, under "Core Window Controls -> Button".  It's hard to see because the buttons are on a white background, but there is a one-pixel gray border around all of them.


Daniel Hyams

unread,
Mar 8, 2013, 12:48:37 PM3/8/13
to wxpytho...@googlegroups.com
And sorry, forgot to post the wx version again.  2.9.4.0.

And a small image is attached to show the border being referred to.



--
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-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Daniel Hyams
dhy...@gmail.com
border.png

Tim Roberts

unread,
Mar 8, 2013, 1:07:10 PM3/8/13
to wxpytho...@googlegroups.com
Daniel Hyams wrote:
And sorry, forgot to post the wx version again.  2.9.4.0.

And a small image is attached to show the border being referred to.

On Fri, Mar 8, 2013 at 12:43 PM, dhyams <dhy...@gmail.com> wrote:
My google-fu has failed to find a solution to this one :(  But surely it must a common problem, if indeed it is a problem.

Under Windows, how do you get rid of the one-pixel wide border around just a regular wx.Button?  I'm trying to draw the button on top of a non-gray background, and it's a bit unsightly.

The outermost 3 pixels of the button image are drawn by the native button control.  Its color will vary depending on your desktop theme.  If you need a custom look and feel, then you'll need to draw your own using a panel.  See the BitmapButton and GenericButtons samples in the big wx demo.
-- 
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
Reply all
Reply to author
Forward
0 new messages