Hi
I am new to C#.
I have to enable my text box whn the check box is checked.
It would be very helpful if i can get the code for this.
DIPY
0
Newbie Poster
Recommended Answers
Jump to PostYou can use a one-liner ;)
textBox1.Enabled = checkBox1.Checked;
DIPY -- Are you getting a callstack overflow error? I'm looking at the code you pasted and in the event you are changing the check status of the checkbox that fired the event.
public void …
Jump to PosttextBox1.Enabled = !checkBox1.Checked;
(using exclamation point)
Try it like that for the effect that you want.
Jump to PostIt's two different people, that's why. Bokac piggybacked on the original thread (which he probably shouldn't have).
Jump to PostHere is part of my code, but what happens is that when I click on this checkbox nothing happens, my textboxes stay unchanged, like I didnt do anything. I have no idea what I am doing wrong. ReadOnly property, I am not sure I follow you.
Have you created the …
All 16 Replies
MeSampath
4
Junior Poster
DIPY
0
Newbie Poster
MeSampath
4
Junior Poster
th3learner
0
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
bokac1984
0
Newbie Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
kplcjl
17
Junior Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
bokac1984
0
Newbie Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
kplcjl
17
Junior Poster
Geekitygeek
480
Nearly a Posting Virtuoso
umang_2505
0
Newbie Poster
hirenpatel53
-1
Posting Whiz in Training
hirenpatel53
-1
Posting Whiz in Training
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.