helloi made a class that inherite from text box.
i have a Textbox that receives a button as Clean button. then a function is added to this button's events.
this function clean content of textbox.
but my code dose'nt work.
public partial class MyTxt : TextBox{
public MyTxt()
{
InitializeComponent();
}public MyTxt(IContainer container)
container.Add
this);
CleanButton =
new Button();
CleanButton.Click +=new EventHandler(CleanTxt);}
public void CleanTxt(object sender, EventArgs e)
this.Text = "";}
private Button _CleanButton ;
public Button CleanButton
get { return _CleanButton; }
set { _CleanButton = value; }
}