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

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.

it woked...I have also implemented the customised form in the WPF application

how do i mark this as answered?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.