Re: win32lib: ListView with checkboxes

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

Thanks Larry, Jonas.

The following code worked well for ListView.

procedure readonlyLVTV (integer self, integer event, sequence params)--params is
()
	returnValue(w32True)
end procedure

global procedure setLVTV(integer CtlId, integer CtlMode) -- CtlMode = 0:ReadOnly
1:Editable
sequence Lists, className
	Lists = {"SysListView32", "SysTreeView32"}
	className = getClassName(CtlId)
	if find(className, Lists) then
		setEnable(CtlId, w32True)
		if CtlMode then
			removeHandler(CtlId, w32HMouse, routine_id("readonlyLVTV"))
			addStyle(CtlId, WS_TABSTOP)
		else
			setHandler(CtlId, w32HMouse, routine_id("readonlyLVTV"))
			removeStyle(CtlId, WS_TABSTOP)
		end if
	else
		setEnable(CtlId, CtlMode)
	end if
end procedure


But looks like it does not have any effect on a TreeView, as TreeView is
still accessible after setting the handler.

Regards,
Rad.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu