"Slow focus" when handling wxEVT_SET_FOCUS

Robert Roebling robert at roebling.de
Sun Dec 3 12:17:17 PST 2006


Zokbor wrote:

> I created a class to conveniently create two wxStaticText, a wxTextCtrl
> and a wxSpinButton widgets in a single call. Also, the class needs to
> handle SetFocus() events on the wxTextCtrl. Although the code seems to
> work, connecting to the wxEVT_SET_FOCUS event results in slow focusing:
> when I click on a text control, the callback is immediately called
> (i.e. the printf() message appears immediately), however, it takes
> about a second before the widget on screen is redrawn with the "focus
> rectangle" (using wxWidgets 2.6.1, gcc 4.0.3, Ubuntu Linux 6.06).

Don't know the reason, but if you call event.Skip(), does
the problem persist? We have changed the way wxGTK handles
the case, when user code intercepts SetFocus(). I forgot
in which version this change was made.

  Robert

OT: Does Ubuntu 6.06 really ship with 2.6.1? Is that because
    there was no Debian package for 2.6.3, which in turn was
    because - ah - forget it.





More information about the wx-users mailing list