-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, is there a way to disable selection by mouse click for a Listbox? This means users can not click to select Listitems, but the underlying program can still select them by calling Listbox.selectItem. Thanks.
I don't know if this going to work as I never tried this myself.......
But what you could do is make all rows inside libox disabled (this Might stop mouse selection but might not)
if it does then all you do later on is just call setSelected on the row by underlying program...........
This is just a theory to try..........
Disabling the listtems works, but it greys out everything. What I wanted was to disable selection by use of the row in general but maintain ability to select using the checkbox. I added this to each list cell:
listcell.setAction("onmouseover:stopEvent(event);onclick:stopEvent(event);"); listcell.setSclass("nopointer");
With this JS:
function stopEvent(event) { if (!event) var event = window.event event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation(); }
td.z-list-cell.nopointer { cursor: default; }
/Daryl
Well, it looked good, but didn't work. It seems the selection of an item is done via the cell/row rather than the checkbox. (Selecting a checkbox does not select the listitem.) I'll have to change things so the first cell under the checkbox is as usual.
/Daryl
Can we maintain listbox state??
I have added data in to my listbox i have used person class with attribute name,image etc.
i want to add data then it should be disabled when i add next data, disabled data should remain same.
please give me solution...
Its working fine.
Asked: 2009-06-18 14:35:34 +0800
Seen: 2,906 times
Last updated: May 07 '12