[pygtk] Can't get tool tip to display

Gerald Britton gerald.britton at gmail.com
Sat Nov 27 04:04:44 WST 2010


Hi -- I have a treeview where I want tooltips to display upon
mouse-hover.  I need help to see what I'm missing in this section
since the tips are not popping up:  ("columns" is a simple list of
column names)

        self.view = gtk.TreeView()
        self.model = gtk.ListStore(*[str] * (len(columns) + 1))
        for index, name in enumerate(columns):
            renderer = gtk.CellRendererText()
            if index > 0:
                renderer.set_property('editable', True)
                renderer.connect('edited', self.__cell_edited,
                                                (self.model, index + 1))
            column = gtk.TreeViewColumn(name, renderer, text=index + 1)
            foo = gtk.Tooltip()
            foo.text = name
            self.view.append_column(column)
            self.view.set_tooltip_cell(foo, None, column, None)

-- 
Gerald Britton


More information about the pygtk mailing list