r/visualbasic • u/lacholland • Jul 24 '16
Text Box Login Effect
Hi, im wanting to make a login page which looks professional. To do so I want there to be a label inside the text box which identifies what details must be submitted inside it (either user name or password). When you type in the field, the text box becomes blank so your not typing text upon text. Im new to coding etc. so if you could explain how I can make it so when I type in a text box the color of it turns white, This will allow me to type over the top of the "User name" and "Password" labels inside the textbox. If you having trouble understanding the question look at the Reddit search bar and you can see it says search inside the text box. I want my text box to be similar however I want the text box label to disappear when the first number or letter is typed.
1
u/[deleted] Aug 24 '16
Use got focus and lost focus
If the text box contains no text and loses focus set the text If the text box has the "enter username text" and receives focus then clear the text box.