i need a bit of help with c#
basically, for example if the person presses the black button the label will turn white, if they press the white button the label turns black
25 Replies
Why are you subscribed to label click event at all? Based on your problem statement it's only button click events.
Maybe you can try setting label color in the button click events for instance
thats a good idea
but how would i do it?
What is the name of the label
label1 rn
Does label1 have properties you can use? hint: label1.<something>
i did: this.label1 = color.white;
i can do that
Label1.ForeColor for instance
just changed it
its saying 'forecolor' is not a null here
nevermind it just updated
but now a diffrent problem
Label1.ForeColor
You're setting the form color
With this.
oh, soo what do i use?
label1
.
ForeColor
label 1 doesnt exist anymmore
What happened to the label?
changed it
To what
to forecolor
The name of the label is forecolor?
yes
So ... what do you think you should type
uh
im kinda confused
forecolor is the name of the control
Try forecolor.ForeColor = Color.White;
it turned into a exe and died lol
Damn, code that compiles itself
Advanced stuff lmao