hephy-dd / comet

COMET - Control and Measurement Toolkit
GNU General Public License v3.0
2 stars 2 forks source link

Add tree UI widget #32

Closed arnobaer closed 4 years ago

arnobaer commented 4 years ago

Add a simple to use tree widget.

tree = comet.Tree(header=["Key", "Value"])
spam = tree.append(["spam", 1000])
spam.append(["ham", 2000])
spam.append(["eggs", 3000])
for item in tree:
    item[0].checked = True # set checkd state
    for child in item.children:
        child[0].checked = False
        child[1].color = "green"

tree