Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fullmacht opened this issue May 24, 2020 · 1 comment
Open

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

fullmacht opened this issue May 24, 2020 · 1 comment
Labels

Comments

@fullmacht
Copy link

fullmacht commented May 24, 2020

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

@jarvisteach
Copy link
Owner

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants