After I posted this, I tried something to achive what I wanted. It seems to
work. Please advise if you see any problems with this approach. I am
assuming that this is NOT the classic use of OO and inheritance..but is
there any real problem with this approach?
(and BTW, I am not an idealist... I am far more interested it just getting
the job done as simply as possible)
Earl
In the properties below, the private properties hide the inherited
properties from public access. Then I create my new properties and set the
base properties from them...
//Hide Public Property BorderColor
private System.Drawing.Color BorderColor
{
get{
return System.Drawing.Color.Black;
}
}
//Hide Public Property BorderWidth
private System.Web.UI.WebControls.Unit BorderWidth
{
get
{
return System.Web.UI.WebControls.Unit.Pixel(0);
}
}
[Bindable(true),
Category("Apperance"),
DefaultValue("")]
public System.Drawing.Color InnerBorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor=value;
}
}
[Bindable(true),
Category("Apperance"),
DefaultValue("")]
public System.Web.UI.WebControls.Unit InnerBorderWidth
{
get
{
return base.BorderWidth;
}
set
{
base.BorderWidth=value;
}
}
Earl Teigrob said:
Is there a way to rename the public properties of a inherited class? I am
inheriting an asp.net control (class) and am adding addtional functionality.
(in this case, up to 3 borders on an imagebutton control) I would like to
change the name of the BorderColor property to InnerBorderColor because it
would make more sense in the context of this this new control.
Thanks
Earl