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

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 (3.82 KB)

flowers.jpg

btnWithWhiteOutline.jpg

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.

···

On 3/23/11 9:34 AM, jcie python wrote:

Hi,

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

--
Robin Dunn
Software Craftsman