See Also: Tooltips Members
Tooltips are the messages that appear next to a widget when the mouse pointer is held over it for a short amount of time. They are especially helpful for adding more verbose descriptions of things such as Gtk.Button in a toolbar.
An individual tooltip belongs to a group of tooltips. A group is created by calling the constructor Tooltips(). Every tooltip in the group can then be turned off with Tooltips.Disable() and on with Tooltips.Enable().
To assign a tip to a particular Gtk.Widget, Tooltips.SetTip(Widget, string, string) is used.
Note: Tooltips can only be set on widgets which have their own X window. To add a tooltip to a Gtk.Widget that does not have its own Gtk.Window, place the widget inside a Gtk.EventBox and add a tooltip to that instead.
The default appearance of all tooltips in a program is determined by the current Gtk theme that the user has selected.
C# Example
using Gtk; class ToolTipsExample { static void Main() { Application.Init(); Window win = new Window("Tooltips"); Button load_button, save_button; HBox hbox; Tooltips button_bar_tips; button_bar_tips = new Tooltips (); // Create the buttons and pack them into a Gtk.HBox hbox = new HBox (true, 2); win.Add(hbox); load_button = new Button ("Load a file"); hbox.Add(load_button); save_button = new Button ("Save a file"); hbox.Add(save_button); // Add the tips button_bar_tips.SetTip (load_button, "Load a new document into this window", "longer explanation"); button_bar_tips.SetTip (save_button, "Saves the current document to a file", "longer explanation"); win.ShowAll(); Application.Run(); } }