Re: Tooltips don't appear every time while hoovering over a widget
- From: Thomas Funk <t funk web de>
- To: gtk-perl-list gnome org
- Subject: Re: Tooltips don't appear every time while hoovering over a widget
- Date: Thu, 06 Mar 2014 12:25:51 +0100
On 03/05/2014 08:14 PM, zentara wrote:> On Wed, 5 Mar 2014 14:08:51 +0100
"Thomas Funk" <t funk web de> wrote:
"Emmanuele Bassi" <ebassi gmail com> wrote:
don't. GtkTooltips has long since been deprecated, and should never be
used in newly written code:
https://developer.gnome.org/gtk2/stable/GtkTooltips.html
you should simply set the tooltip through the
Gtk2::Widget::set_tooltip_text() method (or set_tooltip_markup()
method, if you want to use Pango markup in the tooltips).
I tried this already but it has the same behaviour - tooltip is shown
around the corners of a widget only :-(
Could you provide a perl snippet so that I understand what I have to do?
Thanks,
Thomas
Hi, I don't want to contradict Emmanuelle Bassi, about
it being deprecated, but here is a script that works
with Tooltips.
The glitch as far as I remember, was that tooltip needed
an eventbox on non-windowed widgets, like Labels. I hope this
example helps.
First of all thanks for the script :-)
Gtk2::Tooltips doesn't work inside the module (SimpleGtk2.pm)
=> if you hoover the mouse cursor over a widget the tooltip only
appears at the border of the widget.
Outside, in the top level script (testem.pl) it works fine - you
can hoover inside the widget area around without the tooltip
disppears. But for the usage it would be better the module can
handle it.
For Gtk2::Tooltip I've found an example (in gmusicbrowser) for
set_tooltip_area and how that works ^^
But the same behavior as with Tooltips - with the default
set_tooltip_text tooltips only around the widget border
With the query_tooltip signal, too :-(
Probably I must use a window tooltip described here:
https://wiki.gnome.org/Attic/GTK2-Perl/Recipes#How_can_I_programmatically_popup_a_tooltip_.3F
I've started a try with that using the two events enter and leave -
with print no problem, but showing another window it blocks the widget.
Perhaps I have to start it in a separate thread as I did it in
Python (I don't know if it is possible in Perl, too) ...
Or let the tooltips away.
I will make some other tests if this issue with the tooltips
showing only around the border depending on the fixed container
I put the widget in.
- Thomas ---
--
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." --
Albert Einstein
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]