Re: Gtk2 Treeview/Simplelist and set_tooltip_row()
- From: Paul Miller <listmail voltar-confed org>
- To: muppet <scott asofyet org>
- Subject: Re: Gtk2 Treeview/Simplelist and set_tooltip_row()
- Date: Tue, 29 Apr 2008 12:39:23 -0400
On Tue, Apr 29, 2008 at 12:13:00AM -0400, muppet wrote:
Close. You were on the right track, but just needed to go a little
further. You don't create a Tooltip object, gtk+ will create it for you,
and ask you to set it up.
http://library.gnome.org/devel/gtk/stable/GtkTooltip.html#id4209774
http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-query-tooltip
http://library.gnome.org/devel/gtk/stable/GtkTreeView.html#gtk-tree-view-set-tooltip-row
Here's your program again, but with working tooltips.
Wow, thanks. This answers all my questions on the topic and I
should have my stuff working later today.
use strict;
I suspect you pasted the wrong source because this program won't
compile as is under use strict. I'm posting the minor
corrections for future readers.
my $categories = Gtk2::SimpleList->new ('Categories' => 'text');
Added a my here.
my $path = $categories->get_path_at_pos ($x, $y);
Added a my here.
$tooltip->set_text(${ $categories->{data} }[$index][0]);
The above didn't work at all and just set the tip to the string
''. It might depend on the Gtk2.pm version? No idea. I used
this instead:
$tooltip->set_text("lawl: " . int(1+rand 200))
my $window = Gtk2::Window->new;
Added a my here.
-Paul
--
If riding in an airplane is flying, then riding in a boat is swimming.
85 jumps, 36.0 minutes of freefall, 69.1 freefall miles.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]