listbox
element describes a list or table with one or more columns.listhead
element describes the header of a listbox
listheader
element describes one columns definition in the header of a listbox
listitem
element describes one item in a listbox
listcell
element describes one cell in an item for a multicolumn listbox
listbox
:listbox
element and one listitem
element for each row.listbox
elementlisthead
element to declare the headerslistheader
element under the listhead
element to declare the unique headerlistitem
element for each rowlistbox
elementlisthead
element to declare the headerslistheader
element under the listhead
element for each column headerlistitem
element for each rowlistcell
element under the listitem
element for each cellonselect
command on the listbox
allows to listen to row selection events. For example:<window id="hello" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" > <script> function select() { var index = document.getElementById("theList").currentIndex; print("selected " + index); } </script> <listbox id="theList" onselect="select()"> <listitem label="Ruby"/> <listitem label="Emerald"/> <listitem label="Sapphire" selected="true"/> <listitem label="Diamond"/> </listbox> </window>
<listbox"> <listitem label="Ruby"/> <listitem label="Emerald"/> <listitem label="Sapphire" selected="true"/> <listitem label="Diamond"/> </listbox>The result is:
<listbox id="theList"> <listhead> <listheader label="Color"/> </listhead> <listitem label="Ruby"/> <listitem label="Emerald"/> <listitem label="Sapphire" selected="true"/> <listitem label="Diamond"/> </listbox>The result is:
<listbox id="theList"> <listhead> <listheader label="Name"/> <listheader label="Age"/> <listheader label="City"/> </listhead> <listitem> <listcell label="Julia"/> <listcell label="19"/> <listcell label="Boston"/> </listitem> <listitem> <listcell label="Sandra"/> <listcell label="25"/> <listcell label="London"/> </listitem> <listitem> <listcell label="Sharon"/> <listcell label="35"/> <listcell label="Paris"/> </listitem> </listbox>The result is:
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence