Can't make it work wx.Button.SetBackgroundColour on wx.EVT_ENTER_WINDOW

Hi again! :slight_smile:

Title says it all.
When I hover the button, I’ve got a very light grey/blue color. Only when I pressed and won’t let it go, it becames red. OnLeaveHover works fine. I’m on Windows 10.

The result:
Untitled

The code:

import wx

class MyClass(wx.Frame):
    def __init__(self, parent):
        wx.Frame.__init__(self, parent)

        self.btn = wx.Button(self, -1)
        self.btn.Bind(wx.EVT_ENTER_WINDOW, lambda event: self.OnHover(event, self.btn))
        self.btn.Bind(wx.EVT_LEAVE_WINDOW, lambda event: self.OnLeaveHover(event, self.btn))

    def OnHover(self, event, button):
        button.SetBackgroundColour(wx.RED)

    def OnLeaveHover(self, event, button):
        button.SetBackgroundColour(wx.BLUE)

app = wx.App()
frame = MyClass(None)
frame.Show()
app.MainLoop()

Thanks!