wxWidgets - Odd bug with text fields

BlitzMax Forums/Brucey's Modules/wxWidgets - Odd bug with text fields

Pete Rigz(Posted 2013) [#1]
There seems to be an issue with connecting the wxEVT_KILL_FOCUS in that it's causing fields that you tab through to remain highlighted and also in some cases become uneditable, or not focusable. Sometimes you can click in one field and the caret position is being changed in another field so I don't know if IDs are being mixed up or something after the focus is lost :)

Here's a screen shot of what is happening:



example of a connector:

txt_frames.ConnectAny(wxEVT_KILL_FOCUS, _OnFramesLostFocus, Null, Self)


I should add that removing the connector makes the issue go away, but obviously I need it working :)


Brucey(Posted 2013) [#2]
Hello, according to the docs you should call event.Skip() to ensure the focus event is handled correctly further up the chain.

Presumably if you aren't doing this, that may be where your strange behaviour is coming from.

To be fair, this is only mentioned in the latest documentation (2.9.x) and not in the original (2.8.x) from which I used in the inline docs.
I'll update the docs for this event.


Pete Rigz(Posted 2013) [#3]
Ahh that explains it then :) I'll have to remember to refer to the latest docs, I also use a book that's based on 2.8 so there's obviously a few things out of date.

Anyway adding the skip has sorted it, thanks!