Link to home
Start Free TrialLog in
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
Avatar of Vikram Singh Saini
Vikram Singh Saini
Flag of India image

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

(2) Why such requirement?
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
Avatar of Vikram Singh Saini
Vikram Singh Saini
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 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.