Is it possible to check if a TextCtrl is under keyboard focus (blinking cursor in text box) without defining a handler for EVT_SET_FOCUS?
I just want to do a quick boolean check to prevent a wx.Timer from overwriting the text box if the user is writing something in the box.
You can bypass a timer update by finding which window has the focus (using
FindFocus) and comparing this to your TextCtrl window. Then, if your TextCtrl has the focus you can leave it alone. Here’s an example: