[pygtk] Can't get tool tip to display
Gerald Britton
gerald.britton at gmail.com
Fri Dec 3 04:08:12 WST 2010
Reposting this query in case it has fallen off the radar
On Fri, Nov 26, 2010 at 3:04 PM, Gerald Britton
<gerald.britton at gmail.com> wrote:
> 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
>
--
Gerald Britton
More information about the pygtk
mailing list