BitmapButton shows focus erroneously
Jeffrey Barish
jeff_barish at earthlink.net
Sat Jun 3 08:41:22 PDT 2006
Robin Dunn wrote:
> Because it has already lost the focus (and processed that event) before
> it has a chance to finish processing the EVT_SET_FOCUS event. If you
> defer the call to SetFocus then it will work as you expect.
>
> def doSetFocusEvent(self, event):
> wx.CallAfter(self.textctrl.SetFocus)
> event.Skip()
>
You are right: This change solves the problem with focus. But now I can't
get the button to do anything because it no longer produces EVT_BUTTON.
Wait, I wasn't getting EVT_BUTTON in the original version of the test
(without the CallAfter) either. I'm confused because the buttons still
work in the actual program even though they go into the metafocus mode.
--
Jeffrey Barish
More information about the wxpython-users
mailing list