appJar icon indicating copy to clipboard operation
appJar copied to clipboard

How make a selection a branch in tree with double click?

Open fullmacht opened this issue 4 years ago • 1 comments

How to get the value of selected with double clicked branch in tree? How to make this double click function in appJar?

fullmacht avatar May 24 '20 20:05 fullmacht

The tree is still a little buggy...

You could try this code:

from appJar import gui
def click(tree, id):
    print(app.getTreeSelectedXML(tree))

with gui() as app:
    app.addTree("t1",
        """<people>
        <person><name>Fred</name><age>45</age><gender>Male</gender></person>
        <person><name>Tina</name><age>37</age><gender>Female</gender></person>
        <person><name>CLive</name><age>28</age><gender>Male</gender></person>
        <person><name>Betty</name><age>51</age><gender>Female</gender></person>
        </people>""")
    app.setTreeDoubleClickFunction('t1', click)

jarvisteach avatar Jan 30 '21 21:01 jarvisteach