A mandatory label user control in C#
Ok - I just need some ideas here. The scenario is - There are a lot of
fields in my windows form which are mandatory to be entered by the user.
One of them might be "Name". So for this, I have a label lblName with text
Name, another label lblMandatory with text * colored in red which
signifies it is mandatory. So that means I have two labels for a field
Name, and similarly I have more than 20 fields in my form. I was just
thinking of creating a custom label - something called
MandatoryLabelControl which will have a * by default after it's text. This
would help me in decreasing the number of labels in my form. The custom
label is actually a combination of two things - First a text for the
label, secondly the * in red color. I searched for this a lot, but can't
find anything to start with. Please help with some suggestions.
No comments:
Post a Comment