Disabling Mouse-Clicks on a TreeView

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

Hi,

Is there a way to disable mouse-clicks on a TreeView control?

I am using following logic for all the controls which works fine except
TreeView:

--#==========================================================================
--#Enable / Disable a control and it's children.
--#==========================================================================
procedure readonlyCtl (integer self, integer event, sequence params)
	returnValue(w32True)
end procedure

function setCtlAccess(integer CtlId, integer avail_mode)
sequence children, className
	className = getClassName(CtlId)
if find(className, {"ComboBox", "ComboLBox", "ComboBoxEx32", "Button",
"SysListView32", "SysTreeView32"}) then
		if avail_mode then
removeHandler(CtlId, {w32HMouse, w32HKeyDown, w32HKeyUp, w32HClick},
routine_id("readonlyCtl"))
			addStyle(CtlId, WS_TABSTOP)
		else
setHandler(CtlId, {w32HMouse, w32HKeyDown, w32HKeyUp, w32HClick},
routine_id("readonlyCtl"))
			removeStyle(CtlId, WS_TABSTOP)
		end if
	else
		setReadOnly(CtlId, iff(avail_mode, w32False, w32True))
	end if 
	children = getChildren(CtlId)
	for i = 1 to length(children[1]) do
		void = setCtlAccess(children[1][i], avail_mode)
	end for
	return w32True	
end function
#==========================================================================


In case of TreeView, I can still click and navigate it.

Regards,
Rad.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu