First, in the Visual Studio Form Designer, double-click on the
LinkLabel
. Now, an event handler to the
LinkClicked
method is created, and now, you can edit the code of the
yourLinkLabel_LinkClicked
method:
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
yourTextBox.Visible = true;
}
[Edit]
If you want to make the text box invisible when clicking a second time, try this:
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
yourTextBox.Visible = !yourTextBox.Visible;
}