Re: Win32lib: clicks and focus problems with mouse vs. keyboard
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 29, 2003
- 435 views
----- Original Message ----- From: "Pete Lomax" <petelomax at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Subject: Re: Win32lib: clicks and focus problems with mouse vs. keyboard > > > On Sun, 29 Jun 2003 08:48:32 +1000, Derek Parnell > <ddparnell at bigpond.com> wrote: > > > > >----- Original Message ----- > >From: "Pete Lomax" <petelomax at blueyonder.co.uk> > >To: "EUforum" <EUforum at topica.com> > >Sent: Monday, June 23, 2003 10:28 PM > >Subject: Win32lib: clicks and focus problems with mouse vs. keyboard > > > > > >> Two for the price of one today. > >> > >> 1) One the first screen (Noisy Clicks"), selecting the radio buttons > >> with the mouse is fine, but using Alt A, B, or C causes a click to be > >> heard. It is the same noise I get from Alt D which I'd expect. > > > >Using Windows ME here, and I can't hear any clicks. Sorry, but I don't know > >how to 'fix'. > > Just checking: If you run Notepad and press (eg) Alt-K do you get a > click? You may have to increase the volume a bit to make it clear; in > contrast, Alt-F (which opens the File menu) is silent. > Nope. No clicks here. I think its clicking though because the KeyUp is getting passed to Windows without the corresponding KeyDown event. I'll work on that angle, anyhow. [snip] > > > Did you notice my > follow-up re setEnable(list,False)? > I've also realised that a returnValue(-1) will cure this (question > being should I really have to code either). Yes, I've dealt with that now. > >However, it did find a situation which might of caused some bugs elsewhere > >when a control in a closed window tries to take focus. I've now catered for > >that situation, > I'll retest when you release that, sounds pretty much what is wanted. > > but I'm adverse to coding a special case for the List > >Double-click effect. > Correct. When/if you find the bug (obviously) you'll fix it, but any > kind of silly interim fudge helps no-one. Technically, there is no bug as this is the Microsoft-defined behaviour for List controls. It seems that MS in their wisdom has decided that for LIst controls, a LeftButtonUp event follows the LeftDoubleClick event and that it will retake the focus when it does happen. -- Derek