How tooltips works?

Hi, I have to make some tooltips appear around my gui. I've read some docs but I can't figure how to make it work. I have this little piece of code:

public void OnGUI()
{
    GUI.Button(new Rect(10, 10, 100, 100), new GUIContent("Button", "ToolTip"));
}

This should display a button on the screen, but when i put the mouse over it the tooltip is not displayed. what am I missing?

You're missing this:

GUI.Label (Rect (10,40,100,40), GUI.tooltip);

Add it somewhere in OnGUI()

http://unity3d.com/support/documentation/ScriptReference/GUI-tooltip.html

Tooltips don't display automatically...that's up to you. There are a million different styles and methods you can use, so you have to decide on something and then implement it.