Listbox

From Documentation
Revision as of 10:54, 14 July 2020 by Jameschu (talk | contribs)

Listbox

 since 9.5.0

Related components

Auxhead, Auxheader, Listcell, Listfooter, Listgroup, Listgroupfoot, Listheader, Listitem

Required Settings

Attributes
Description
aria-label Describe the listbox.

Keyboard Support

Key
Description
ArrowUp/ArrowDown Select Listitems or focus on Listheaders.
ArrowLeft/ArrowRight Focus on Listcells or Listheaders
Enter/Spacebar If the checkmark is enabled, press Enter/Spacebar would toggle the checkbox.

Example

    <zk xmlns:ca="client/attribute">
        <listbox width="350px" ca:aria-label="Team Member">
	    <listhead>
	        <listheader label="name" sort="auto" />
                <listheader label="gender" />
                <listheader label="phone" />
	    </listhead>
	    <listitem>
	    	    <listcell label="Mary" />
	    	    <listcell label="FEMALE" />
	    	    <listcell label="000000000" />
	    </listitem>
	    <listitem>
	    	    <listcell label="John" />
	    	    <listcell label="MALE" />
	    </listitem>
	</listbox>
    </zk>