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('h list').add('br1 ',text='branch 1')
tr.subwidget('h list').add('br1 .b1',text='bran ch 1-1')
tr.subwidget('h list').add('br1 .b1.b1',text='b ranch
1-1-1')
tr.subwidget('h list').add('br1 .b1.b2',text='b ranch
1-1-2')
tr.subwidget('h list').add('br1 .b2',text='bran ch 1-2')
tr.subwidget('h list').add('br1 .b2.b1',text='b ranch
1-2-1')
tr.subwidget('h list').add('br1 .b2.b2',text='b ranch
1-2-2')
r.tk.call(tr,'s etmode','br1',' close')
r.tk.call(tr,'s etmode','br1.b1 ','open')
r.tk.call(tr,'s etmode','br1.b2 ','open')
#tr.setmode('br 1','close')
#tr.setmode('br 1.b1','open')
#tr.setmode('br 1.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