Avatar of crp81
crp81
 asked on

Finding selected label from a Tabpage.

Could someone help me with this code, I am a beginner C# programmer, I think it will be easy for the experts.

I have a tabcontrol with 5 different tabpages, each tabpage has about six labels. one label in each tab has the forecolor = white (which means it is selected).

If a user selects a new label, I want a method to change the previously selected "White label" in the same tabpage to black.

Detail code please, I am a beginner at C#, Thanks
C#

Avatar of undefined
Last Comment
Mike Tomlinson

8/22/2022 - Mon
Vikram Singh Saini

(1) What you mean by selected label ? Is it mean same when label is clicked (or selected).

(2) Why such requirement?
jagssidurala

I can tell the logic as per your comments given

First make all labels colors to Black , then make the selected label to color white.

ASKER CERTIFIED SOLUTION
Vikram Singh Saini

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
kashyap

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Mike Tomlinson

Sounds like you want ONE selection per GROUP...which is a perfect fit for RadioButtons.  Just place them on the TabPages and only one RadioButton per TabPage can be selected at a time.
Your help has saved me hundreds of hours of internet surfing.
fblack61