Hi,
I have created a listbox with 2 columns:
-Name
-Time
the listbox is inside a .xul file and through another .js file I add labels
to the listbox. Everything works but I can add items only to the first
column. I am trying to add items to both columns but I can't figure out how.
I don't want to type in the .xul file the
<listcell label="blabla"/>
<listcell label="blabla"/>
because the label changes quite often.
To make it easy le'ts assume that I want to type into a textbox what will
appear in the listbox... in this way I can't use the <listcell> comand.
I paste here part of the xul code:
<listbox id="bla1" rows="25" seltype="multiple" flex="0" style="font-size:
10px; overflow-x: hidden;">
<listhead>
<listheader label="Name"/>
<listheader label="Time"/>
</listhead>
<listcols>
<listcol flex="1"/>
<listcol flex="1"/>
</listcols>
<listitem>
<listcell id="bla2"/>
<listcell id="bla3"/>
</listitem>
</listbox>
and to insert he item in the listbox I use:
function si(event)
{
var bla1 = document.getElementById("bla1");
bla1.insertItemAt(0, "ciao");
}
I set the listcell with id's as I thought that I could do
bla1.bla2.insertItemAt(0, "ciao");
bla1.bla3.insertItemAt(0, "ciao2");
but it does not work. I used the appendItem too but it didn't work.
Please someone help me with this problem.
Thanks
_______________________________________________
dev-tech-xul mailing list
dev-tech-xul@...
https://lists.mozilla.org/listinfo/dev-tech-xul