[pygtk] Can't get tool tip to display

Dieter Verfaillie dieterv at optionexplicit.be
Sat Dec 18 00:04:18 WST 2010

On 17/12/2010 15:47, Gerald Britton wrote:
> On Fri, Dec 17, 2010 at 9:43 AM, Dieter Verfaillie
>> On 17/12/2010 15:18, Gerald Britton wrote:
>>> On Thu, Dec 16, 2010 at 5:20 PM, Dieter Verfaillie
>>>> On 16/12/2010 23:04, Dieter Verfaillie wrote:

>>>> Or if you don't need that kind of flexibility you could add a column to
>>>> your model and simply point treeview.set_tooltip_column() to it.
>>>> See
>>>> on how it works.

>>> It looks like this is only for tooltips on entire rows:
>>> "If you only plan to have simple (text-only) tooltips on full rows,"
>>> So, it doesn't really meet my needs, since I want the tips to be by
>>> columns, not rows.

>> Then you just discovered why a custom handler is needed :)
>> See the second version of on_query_tooltip I sent, it does what you
>> need.

> Yup and thanks again.  Still ya gotta wonder if this is not such an
> unusual thing.

Well, it seems to be a pretty unusual thing to do, if google codesearch
can be trusted ;)

> That is, there is a standard way to set tooltips by
> row but not by column.  Wonder if there is interest in adding such a
> feature...

Looks to me the gtk+ developers wrote the "simple" GtkTreeview
set_tooltip_column() support to cover maybe 99% of what people need.
Everything else can be done with GtkWidget's query-tooltip signal
as shown in the examples. I'd say nothing needs to be added, we
already have a pretty powerful & flexible system :)


ps Accidentally took this off list, so let's get it back on for future

More information about the pygtk mailing list