Domanda

I am trying to use tree#Examples and Tree_Widget_Changes#Checkbox_columns (from MDN) to create a preference box where users can (de)select grouped options. For this I want to have main categories without a checkbox, under which sit a collapsable list of child items with checkboxes... the tree example at the first link works, but I can't get it to display checboxes, and I can't find any documentation on how to have the "root" items have no checkboxes.

È stato utile?

Soluzione

You must define the following css for the "checked" checkboxes to appear as checked:

/* default style for checkbox column */
treechildren::-moz-tree-checkbox(checked) { list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); }

For the "root" rows problem, as far as I know, a treeitem groups multiple treerows. Try setting the label attribute of treeitem element and place any child treerow inside it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top