Do you really want its Text property to change when your custom property is
changed? What will happen if a user changes the Text property of the
control after setting the custom property (ButtonType). If you want the
Text to really depend on the custom property, I suggest you override the
Text property of your custom TextBox control and hide it from the
propertygrid (using BrowsableAttribute) and serialization
(DesignerSerializationAttribute). Then in the Set method of your proeprty,
you set base.Text depending on the value of the ButtonType.
public enum ButtonType
{
Add,
Cancel
}
public class CustomButton : Button
{
private ButtonType myProperty = ButtonType.Add;
[DefaultValue(ButtonType.Add),
Category("Custom Properties")]
public ButtonType MyProperty
{
set
{
this.myProperty = value;
base.Text = value.ToString();
}
get
{
return this.myProperty;
}
}
[Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public override string Text
{
get
{
return base.Text;
}
set
{
base.Text = value;
}
}
public CustomButton()
{
base.Text = "Add";
}
}

Signature
Joey Calisay
http://spaces.msn.com/members/joeycalisay/
> I found this after I posted this question in the .NET group and it may have
> been better here.
[quoted text clipped - 19 lines]
> or once I make a change to my original dll how do I get my second solution to
> pick that up.