-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Or make a listitem unselectable?
<listbox > <listhead> <listheader label="H1" sort="auto" /> <listheader label="H2" sort="auto" /> </listhead> <listitem disabled="true" id="li_1"> <listcell label="1" /> <listcell label="2" /> </listitem> <listitem> <listcell label="3" /> <listcell label="4" /> </listitem> <listitem> <listcell label="5" /> <listcell label="6" /> </listitem> <listitem> <listcell label="7" /> <listcell label="8" /> </listitem> </listbox> <button label="dis" onClick="li_1.disabled=true"/> <button label="en" onClick="li_1.disabled=false"/>
I think you can write event handlers for those events and do what you want
My code that i wrote, for me disabled just a certain list item (other items were selectable, just not the specific one specified with the id="li_1" tag) Notice the id is on the listitem, not the listbox.
As HananW wrote, you can use css to change the appearance of disabled items to look the same as enabled items.
Asked: 2009-02-27 22:43:13 +0800
Seen: 962 times
Last updated: Mar 02 '09