private void Form_load(object sender, EventArgs e)
{
textBox.Text = "Place Holder text..."
}
private void textBox_Enter(object sender, EventArgs e)
{
if(textBox.Text == "Place Holder text...")
{
textBox.Text = ""
}
}
private void textBox_Leave(object sender, EventArgs e)
{
if(textBox.Text == "")
{
textBox.Text = "Place Holder text..."
{
}
This places text in the textbox on form load. when focus is placed on the textbox and the current text of the textbox(before focus) is the text of the placeHolder, it clears the text.
If focus leaves the textbox and no text is inserted the text changes back to the placeHolder text.
The check on the placeHolder text when focus is gained on the textbox is to ensure that previously user input text is not removed.
This should give you some idea of how you might want to do it
If this is not what you had in mind
Take a look at this
TextBox with Placeholder[
^]
it might be more to what you are looking for