EditBoxes not getting Focus inside CWindows - Revisited

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

Hi All,

Sometime back I had put a query regarding EditText boxes placed inside CWindows (Child Window found under Extras tab in IDE near bottom area) not getting focus by clicking on them. I was using win32lib v0.60.6 and EuIDE v1.0.2 at that time.

I devised a workaround for the same using following 2 procedures -

procedure EditText_onClick(integer self, integer event, sequence params) 
	setIndex(self, {1, 0}) 
	setFocus(self) 
end procedure 
 
global procedure setEditText(object Edits, integer EditOn) 
sequence AllEdits 
	if atom(Edits) then 
		AllEdits = {Edits} 
	else 
		AllEdits = Edits 
	end if 
	if EditOn then -- setEditText Focus Handler 
		setHandler(AllEdits, w32HClick, routine_id("EditText_onClick")) 
--			void = ResponseWin(sprintf("EditText Fld %d set as ** ON **!", i), 1) 
	else -- remove that handler 
		removeHandler(AllEdits, w32HClick, routine_id("EditText_onClick")) 
--			void = ResponseWin(sprintf("EditText Fld %d set as OFF!", i), 1) 
	end if 
end procedure 

In the main application screen (General section)-

procedure setEditClick(integer self) 
sequence children, className 
	className = lower(getClassName(self)) 
	if equal(className, "edit") then 
		EditTextFlds = append(EditTextFlds, self) 
	end if 
	children = findChildren(self) 
	for i = 1 to length(children) do 
		setEditClick(children[i][1]) 
	end for 
end procedure 
 
--#Enable Mouse Clicks on EditText Controls (work-around for win32lib) 
EditTextFlds = {} 
setEditClick(MainMenu) 
setEditText(EditTextFlds, w32True) 

This arrangement worked well, until I upgraded to win32lib v0.70.4a and EuIDE v1.0.4.

Though the source code is same, EditText boxes which are placed inside CWindows do not get the focus by clicking on them.

I reverted to win32lib v0.60.6 + EuIDE v1.0.2 and everything works fine.

What could be going wrong? Any suggestions/clues are appreciated.

Thanks & Regards, Rad.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu