[Tkinter-discuss] Fwd: Tix hlist-clearing selection

James Brotchie brotchie at gmail.com
Sun Aug 5 06:50:55 CEST 2007

Hey Hani,

Are you sure you are calling the selection_clear method of the hlist child
widget and not the parent tree?

tree = Tix.Tree(root)

If you look in Tix.py you can see that Tree is a compound widget containing
two scrollbars and a hlist.

class Tree(TixWidget):
    def __init__(self, master=None, cnf={}, **kw):
        TixWidget.__init__(self, master, 'tixTree',
                           ['options'], cnf, kw)
        self.subwidget_list ['hlist'] = _dummyHList(self, 'hlist')
        self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
        self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')

Thus to clear the hlist selection you must address the child hlist directly
and not its parent Tree widget.


On 8/5/07, hani abraham <abraham_h101 at yahoo.ca> wrote:

> Hi,
> I'm new to python and i'm using Tix Tree widget in my application. I'm
> trying to clear the tree selection but no luck so far. I tried
> selection_clear and anchor_clear but these aren't working. Can someone help?
> Thanks,
> Hani
> ------------------------------
> Ask a question on any topic and get answers from real people. *Go to
> Yahoo! Answers.* <http://ca.answers.yahoo.com>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20070805/3311f2c5/attachment.html 

More information about the Tkinter-discuss mailing list