0

Hi All,

I am newbie to the C# programming and we have to design a situation with the following use case.

We would like to control the text boxes visibility using a checkbox.
When ever we check the checkbox the textbox should not be visible and when we uncheck the checkbox the textbox should be visible.

Can anyone guide me on this.

Thanks
Vilas

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Geekitygeek
2

Here you go:

private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            textBox1.Visible = !checkBox1.Checked;
        }

Each time the checkboxes checked value is changed the textboxes visible property will be set to the opposite.

0

At the bottom of the screen, just above the quick reply box is a hyperlink that says "Mark Thread as Solved". Click that :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.