- Home /
display hints while mouse is over a text field using tooltip
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
Answer by robertmathew · Mar 11, 2011 at 11:51 AM
 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");
  }
  }
 Answer by ben · Mar 09, 2011 at 05:51 PM
Displayed hint using Event.current.mousePosition........ send me if there any alternate way
Answer by silentslack · Jan 11 at 06:57 AM
This works for me:
 string text = "Text field text";
 GUIContent tooltipLabel = GUIContent.none;
 tooltipLabel.tooltip = "Tooltip goes here";
 text = EditorGUI.TextField(nameRect, tooltipLabel, text);
Your answer
 
 
             Follow this Question
Related Questions
How to Make A GUI Keypad Login With Texture Buttons 1 Answer
Checking for idle hover using tooltips 0 Answers
Display images in tool tips and buttons 1 Answer
GUI.tooltip is not set when hovering dynamic created buttons 1 Answer
scripts not working properly drag doesnt work after its used once. 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                