Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Associate objects with Tix.Tree (http://www.velocityreviews.com/forums/t340347-associate-objects-with-tix-tree.html)

Wolfram Kraus 01-15-2005 05:51 PM

Associate objects with Tix.Tree
 
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


All times are GMT. The time now is 07:10 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.