Gtk::Tooltip - delay?

Hi,

I like Tooltips but they are displayed almost instantly.

I want to set a custom delay, like “wait 3 seconds before displaying a
tooltip”, where the number 3 can be toggled by me or the user
eventually.

Any idea how to achieve this?

Thanks a lot kou!

Hi,

In [email protected]
“[ruby-gnome2-devel-en] Gtk::Tooltip - delay?” on Mon, 09 Sep 2013
11:50:35 +0200,
Marc H. [email protected] wrote:

I like Tooltips but they are displayed almost instantly.

I want to set a custom delay, like “wait 3 seconds before displaying a
tooltip”, where the number 3 can be toggled by me or the user
eventually.

Any idea how to achieve this?

It seems that you can customize the timeout by
“gtk-tooltip-timeout” configuration in GTK+ 3:

https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-tooltip-timeout

For example:

require “gtk3”

“wait 3 seconds before displaying a tooltip”

Gtk::Settings.default.gtk_tooltip_timeout = 3000
window = Gtk::Window.new
window.tooltip_text = “Hello”
window.show_all
Gtk.main

Thanks,

kou

In [email protected]
“Re: [ruby-gnome2-devel-en] Gtk::Tooltip - delay?” on Fri, 27 Sep 2013
22:25:19 +0200,
Marc H. [email protected] wrote:

Thanks a lot kou!

You’re welcome. :slight_smile:


kou

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs