wx.Button, wx.Panel, image background and tab-traversal.

177 views
Skip to first unread message

jcie python

unread,
Mar 23, 2011, 12:34:44 PM3/23/11
to wxpytho...@googlegroups.com

Hi,

How to delete the white outline some buttons placed on an
image of background (resolved) and how to keep the tab-traversal ?

Thanks.
Test.py
flowers.jpg
btnWithWhiteOutline.jpg

Robin Dunn

unread,
Mar 23, 2011, 12:57:10 PM3/23/11
to wxpytho...@googlegroups.com

The outline is there because of how the native buttons draw themselves
and so I don't think it can be removed. You can use non-native button
widgets however, such as those that are in wx.lib.buttons, and have full
control over how they draw themselves.

The loss of tab traversal is because you are putting the buttons on a
wx.StaticBitmap instead of on the panel. wx.StaticBitmap is not
designed to be a control container so it doesn't implement tab-traversal
functionality. Since you are already drawing the bitmap in the panel's
EVT_PAINT event there is no need for the static bitmap, just get rid of
it.


--
Robin Dunn
Software Craftsman
http://wxPython.org

Reply all
Reply to author
Forward
0 new messages