Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Gtk+/Gnome Application Development
Prev Home Next

Tooltips

GTK+ provides tooltip functionality; you simply create a GtkTooltips and attach it to a widget. I like to use the following convenience function in my applications:


void
set_tooltip(GtkWidget* w, const gchar* tip)
{
  GtkTooltips* t = gtk_tooltips_new();

  gtk_tooltips_set_tip (t, w, tip, NULL);
}

The GtkTooltips will be destroyed along with the widget. Make your tooltips long rather than short; there's no reason to skimp on the amount of information you provide here. You should get in the habit of calling set_tooltip() every time you create a button or other widget that could benefit from it.

Note that toolbars created from a GnomeUIInfo template will have tooltips installed automatically.

Gtk+/Gnome Application Development
Prev Home Next

 
 
  Published under free license. Design by Interspire