1. Re: Win32lib: focus problems with mouse vs. keyboard

On Tue, 24 Jun 2003 12:40:59 +0100 (06/24/03 21:40:59)
, Pete Lomax <petelomax at blueyonder.co.uk> wrote:

>
>
> On Mon, 23 Jun 2003 13:28:59 +0100, Pete Lomax
> <petelomax at blueyonder.co.uk> wrote:
>
> [Replying to my own post, since no-one else will blink]
> I finally managed to find a reasonable work-round for the focus
> problem:
>
> procedure onMouselookup(integer self, integer event, sequence params)
> 	if params[1] = LeftDoubleClick then
> 		closeWindow(lookup)
> 		setEnable(list,False)	--<<< this was needed
> 		setText(focus,"by mouse")
> 		setFocus(focus)
> 	end if
> end procedure
> setHandler(list,w32HMouse,routine_id("onMouselookup"))
>
> That's not documented somewhere, by any chance is it? blink
>
> Pete
> PS win32lib even forces the focus back on the list control after
> setVisible(list,False).


The theory is that whenever a Window loses focus, I rcord which control had 
focus in that window, and when a Window regains focus, I set focus to the 
control that I rememebered. However, this looks like it doesn't always 
work. I'll see what I can do.

-- 

cheers,
Derek Parnell

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu