gtk-sharp2.4.0.0Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.Add Tooltips to your widgets.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 in a toolbar.An individual tooltip belongs to a group of tooltips.
A group is created by calling the constructor .
Every tooltip in the group can then be turned off with and on with .To assign a tip to a particular , is used.Note: Tooltips can only be set on widgets which have their own X window.
To add a tooltip to a that does not have its own , place the widget inside a 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.
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();
}
}
Gtk.ObjectMethodSystem.VoidAllows the user to see your tooltips as they navigate your application.Allows the user to see your tooltips as they navigate your application.MethodSystem.VoidCauses all tooltips in the tooltips group to become inactive.Causes all tooltips in the tooltips group to become inactive.
Any widgets that have tips associated with that group will no longer display their tips until they are enabled again with .MethodSystem.VoidEnsures that the window used for displaying the given tooltip is created.Ensures that the window used for displaying the given tooltip is created.
(Applications should never have to call this function, since Gtk# takes care of this.) MethodSystem.VoidAdds a tooltip containing the specified message to the specified .
an object of type
an object of type
an object of type Adds a tooltip containing the specified message to the specified .ConstructorInternal constructor
Pointer to the C object.
This is an internal constructor, and should not be used by user code.ConstructorCreates an empty group of tooltips.Creates an empty group of tooltips. This function initializes a structure.
Without at least one such structure, you can not add individual tips to your application.PropertyGLib.GTypeGType Property.a Returns the native value for .ConstructorProtected Constructor.
a Chain to this constructor if you have manually registered a native value for your subclass.System.Obsolete(Message=null, IsError=False)PropertySystem.UInt32Number of milliseconds of mouse-hover before tooltips pop up.a MethodSystem.Boolean Determines the tooltips and the widget they belong
to from the window in which they are displayed.
a
a
a a This function is mostly intended for use by
accessibility technologies; applications should have little use for
it.