Chp.5 composite control properties
Another question regarding your code doc (or anyone else who's had
success with his code):
I've written public virtual properties for entities such as a label's text, button text, etc; yet I'm unable to change those properties in the VS.NET designer; it ignores changes as if the set{} code of the property doesn't exist. Real simple example:
public virtual string lblHeaderText
{
get
{
EnsureChildControls();
return (lblHeader.Text.Length <=0) ? "Please enter the phone numbers to be added to the conversion list:" : lblHeader.Text;
}
set
{
EnsureChildControls();
lblHeader.Text = value;
}
}
when using the control in design time it ignores changes to this property.
|