Bug in demo: wxListBox.FindPrefix?

Greetings list,

wxListBox: FindPrefix from demo application has a bug: if you press 'E'
and then 'T' just after demo starts selection will incorrectly jump to
'ten'.

You may also note that when starting demo and pressing 'E', selection
will jump to 'eleven' and then back to 'eight'.

I think it occurs because EVT_KEY_DOWN event is fired before EVT_KEY_UP
and so it catched by default wxListCtrl handler.

I've submitted a patch against version 1.6.2.1 of file demo/wxListBox.py
which should correct this misbehaviour by overriding wxTextCtrl's
EVT_KEY_DOWN event handler with dummy one. I'll appreciate if someone
will check if it works for him.

https://sourceforge.net/tracker/?func=detail&aid=636272&group_id=10718&a
tid=310718

Thanks, Victor.

···

----
Sincerely Yours, Victor V. Kryukov, UFG
phone: +7501 967 3727, ext. 4387
email: vkryukov@ufg.com

Krjukov Victor wrote:

Greetings list,

wxListBox: FindPrefix from demo application has a bug: if you press 'E'
and then 'T' just after demo starts selection will incorrectly jump to
'ten'.

You may also note that when starting demo and pressing 'E', selection
will jump to 'eleven' and then back to 'eight'.

I think it occurs because EVT_KEY_DOWN event is fired before EVT_KEY_UP
and so it catched by default wxListCtrl handler.

I've submitted a patch against version 1.6.2.1 of file demo/wxListBox.py
which should correct this misbehaviour by overriding wxTextCtrl's
EVT_KEY_DOWN event handler with dummy one. I'll appreciate if someone
will check if it works for him.

Thanks, fixed.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!