Hi
How do I set the tooltip text for the buttons inside a Toolbar?
I try to pass another array of string for the tooltips but not allowed.
GUI.Toolbar (Rect (8, Screen.height-34, 800, 20), buttonSelection, toolbarStrings, toolbarTips);
thanks
Hi
How do I set the tooltip text for the buttons inside a Toolbar?
I try to pass another array of string for the tooltips but not allowed.
GUI.Toolbar (Rect (8, Screen.height-34, 800, 20), buttonSelection, toolbarStrings, toolbarTips);
thanks
Is this what you mean? From the docs:
function OnGUI () {
// This line feeds "This is the tooltip" into GUI.tooltip
GUI.Button (Rect (10,10,100,20), GUIContent ("Click me", "This is the tooltip"));
// This line reads and displays the contents of GUI.tooltip
GUI.Label (Rect (10,40,100,20), gui.tooltip);
}
You need to create an array of GUIContent objects - these can contain text/image/tooltip
I can’t get a tooltip from a Label. Is this a bug? When I use GUIContent with Buttons or Boxes it works just fine.
Having the same problem, cant make a tooltip from a label. also boxes, buttons no problem. In the documentation it seem to imply that it should work, so is this a bug, or are labels just not supposed to have tooltips?
Anyone know?