[Project_owners] disabling tree rows

Pike pike at kw.nl
Thu Feb 2 16:07:15 EST 2006


> but that sucks, so I want to disable them instead.  How should I solve 
> this problem? Has anyone ever done something like this?  I already tried:
> tree.builderView.getItemAtIndex(row).setAttribute("disabled", "true");
> but that obviously didn't work.  

perhaps obvious, but
you can add properties to a treeitem and
set some css to make it look disabled

<treerow properties="disabled" ...

#mytree treechildren::-moz-tree-row(disabled) {

> BTW: selecting of disabled tree rows
> should not be possible.  What's next?

you could catch the select event, and make it
- store the current selection if it is not disabled
- return to the last stored selection if it is disabled

would be nice to do that in XBL ..

does that help ?


More information about the Project_owners mailing list