Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top