-
PlaceholderTexr
I am new to VB 2026. My laptop has Windows 11, I have reached PlaceholderTexr in the book I am following but it does not seem to work for me. I have a textbox (textbox1) and can see PlaceholderText in the properties. I typed "Please enter you name" into the property and that appeared in the textbox but when I ran the program the textbox was empty. I also tried the line textbox1.PlaceholderTexr = "Please enter you name" in the Form Load event but the box was still empty when I ran the code.
Am I missing something?
-
Re: PlaceholderTexr
By design, when a TextBox has focus (contains the blinking cursor), the placeholder text will disappear.
I would place some dummy control on your form, such as a button, that does nothing. But then, when you run your program, if you click the button, which will give the button focus instead of the TextBox, the placeholder text should re-appear.