By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,427 Members | 1,379 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,427 IT Pros & Developers. It's quick & easy.

Associate objects with Tix.Tree

P: n/a
Heyho!

I want to associate objects with the nodes of a Tix.Tree. Is this
possible, because the following example won't work:

--8<-- Cut here -------------------------
import Tix

class C:
pass

root = Tix.Tk()
top = Tix.Frame(root, relief=Tix.RAISED, bd=1)
tixtree = Tix.Tree(top)
tixtree.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.LEFT)
c=C()
print c
tixtree.hlist.add(c,
itemtype=Tix.IMAGETEXT,
text='foo',
image=tixtree.tk.call('tix', 'getimage', 'folder'))
tixtree.setmode(c, 'open')
root.mainloop()
--8<-- Cut here -------------------------

Can this somehow be done?

TIA,
Wolfram
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.