Win32lib: clicks and focus problems with mouse vs. keyboard

new topic     » topic index » view thread      » older message » newer message

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.

2) The second problem is that if you press the Focus button to get the
second window, then the lookup button, cursor up and down to the
required entry and press Enter, it works fine. If, however, you select
the entry by double clicking on it, the focus is messed up.

Pete
PS 0.59.1, win98.

--
-- Some clicking and some focus problems
--
without warning
include win32lib.ew
--if setAutoFocusLabels(True) then end if

constant main=3Dcreate(Window,"Noisy Clicks",0,100,100,200,200,0),
		 rA=3Dcreate(Radio,"&A",main,10,10,60,25,0),
		 rB=3Dcreate(Radio,"&B",main,80,10,60,25,0),
		 rC=3Dcreate(Radio,"&C",main,150,10,60,25,0),
		 subtn=3Dcreate(Button,"&Focus",main,80,60,60,25,0),
		 sub=3Dcreate(Window,"Focus",main,120,120,320,200,0),
		 ftxt=3Dcreate(LText,"&Focus",sub,10,40,40,25,0),
		 focus=3Dcreate(EditText,"",sub,50,40,100,25,0),=20
		 btn=3Dcreate(Button,"&Lookup",sub,180,40,60,25,0),
		 lookup=3Dcreate(Window,"Lookup",main,150,150,150,300,0),
		 list=3Dcreate(List,"",lookup,10,10,130,280,0)

addItem(list,{"one","two","three"})

-- Even this does not help
--procedure oncloselookup(integer self, integer event, sequence
params)
--	setFocus(focus)
--end procedure
--setHandler(lookup,w32HClose,routine_id("oncloselookup"))

procedure onsubtn(integer self, integer event, sequence params)
	openWindow(sub,Normal)
	setFocus(focus)
end procedure
setHandler(subtn,w32HClick,routine_id("onsubtn"))

procedure onbtn(integer self, integer event, sequence params)
	openWindow(lookup,Normal)
	setFocus(list)
end procedure
setHandler(btn,w32HClick,routine_id("onbtn"))

procedure onKeylookup(integer self, integer event, sequence params)
	if params[1] =3D VK_ENTER then
		closeWindow(lookup)
		setText(focus,"by key")
		setFocus(focus)
	end if
end procedure
setHandler(list,w32HKeyDown,routine_id("onKeylookup"))

procedure onMouselookup(integer self, integer event, sequence params)
	if params[1] =3D LeftDoubleClick then
		closeWindow(lookup)
		setText(focus,"by mouse")
		setFocus(focus)
	end if
end procedure
setHandler(list,w32HMouse,routine_id("onMouselookup"))

WinMain(main,Normal)

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu