I made my own custom TextBox control, but now I need to add the AppendText property, does anyone have any idea how to do this? I can’t seem to find any information about this on Google, I can only find how you use it, not how you implant it in a custom control.
Here is the code of the TextBox if anyone is interested http://pastebin.com/iW4xQCai.
In general, you would be much better off inheriting directly from
TextBoxinstead of creating a composite control.Either way, there should be no problem implementing the
AppendTextmethod (there is a difference between a method and a property).If you are not overriding
TextBox, simply add a new method to your class which passes the call to your textbox.If you are overriding
TextBox, this would require absolutely no code as the method would already be inherited.