I have a login window in that a password and user text fields there also have a button . I have displayed a hint using tooltip while we mouse over the button(GUIcontent is there), but i couldn't the same with text fields, give me your valuable ideas to do that.......
Thanks!!!!!
Displayed hint using Event.current.mousePosition........ send me if there any alternate way
var stringToEdit : String = "";
function OnGUI ()
{
stringToEdit = GUI.TextField (Rect (10, 10, 200, 20), stringToEdit, 25);
GUI.Label(Rect(10,10,300,50),GUIContent(" ","label1"));
if(GUI.tooltip == "label1")
{
GUI.Label (Rect (210,30,300,40), "enter in text field");
}
}
Displayed hint using Event.current.mousePosition........ send me if there any alternate way
This works for me:
string text = "Text field text";
GUIContent tooltipLabel = GUIContent.none;
tooltipLabel.tooltip = "Tooltip goes here";
text = EditorGUI.TextField(nameRect, tooltipLabel, text);