Modifying the Label Property(text and font) by a custom ComboBox
- by BDotA
I have created a custom combobox that has a LABEL property so when we drop it on a form, we can say the Label associated with this ComboBox is say Label2
this is what I wrote for its label property.
The whole thing I want to do is that when I am assigning the Label property of my custom ComboBox to one of the labels on the form, I want that label to change its font to bold and also add an "*" to its Test property. thats it ... but it does not work! any ideas?
private Label assignedLabelName;
public Label AssignedLabelName
{
get
{
return assignedLabelName;
}
set
{
assignedLabelName = value;
assignedLabelName.Text = "*" + assignedLabelName.Text;
assignedLabelName.Font = new Font(AssignedLabelName.Font, FontStyle.Bold);
}
}