Hi,

I tried for the first time a Tix Tree, so, if my
question is naive, I apologize upfront.

The following code:
<code>
from Tix import *

r=Tk()

tr=Tree(r)
tr.subwidget('hlist').add('br1',text='branch 1')
tr.subwidget('hlist').add('br1.b1',text='branch 1-1')
tr.subwidget('hlist').add('br1.b1.b1',text='branch
1-1-1')
tr.subwidget('hlist').add('br1.b1.b2',text='branch
1-1-2')
tr.subwidget('hlist').add('br1.b2',text='branch 1-2')
tr.subwidget('hlist').add('br1.b2.b1',text='branch
1-2-1')
tr.subwidget('hlist').add('br1.b2.b2',text='branch
1-2-2')
r.tk.call(tr,'setmode','br1','close')
r.tk.call(tr,'setmode','br1.b1','open')
r.tk.call(tr,'setmode','br1.b2','open')
#tr.setmode('br1','close')
#tr.setmode('br1.b1','open')
#tr.setmode('br1.b2','open')
tr.grid()

r.mainloop()
</code>

will show the whole tree, but will set correctly the
(+) and (-) boxes. (The commented out statements where
in place before direct calls to Tk - same result).

I was hoping to have some branches hidden (the leaves,
in this case).

How should I proceed?

Thanks,
Sorin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to