[Project_owners] custom <tree/> issues

Pike pike at kw.nl
Tue Jan 17 03:24:04 EST 2006


> I am using a <tree/> element and was wondering if it is possible to have
> the <treecell> elements contain mixed elements? 

no. the treecell element isn't really xul, it is only
xmlformatted input for the contentview treebuilder.

this is typically a question for the xulplanet forums,
you will get lots of response there.

>Perhaps this could be
> done through binding? For example:
> <tree>
>   ...
>   <treecell>
>     <label value="Go here:" />
>     <label value="www.somesite.com <http://www.somesite.com>"
> class="text-link" />
>     <textbox />
>   </treecell>
> </tree>

don't use < and > inside attributes, use &gt; and &lt;

is it necessary to split those labels ? wouldn't
one label be enough ? if it isn't, why dont you
use two colums ?

if the class attribute refers to a binding, it will not work.
if it is only used for styling, read

you can catch the cell the user clicked on in an event,
read the contents of the cell and parse it, if you like.
for example (untested!):
	var treeBox = tree.treeBoxObject;
        var row = {}; var col = {}; var obj = {};
	var text = tree.view.getCellText(row.value,col.value);

> I can do this with a <listbox/> but when I have a lot of rows (like 200)
> the scrolling gets delayed. 
200 items should not really be a problem though ..
try it with 'normal' listitems.


More information about the Project_owners mailing list