There are no explicit inserts or appends for this Control.
This will insert your clipboard text at cursor or replace current selection:
telep.SelectedText = Clipboard.GetText();
This will do append (credit to orc_orc_orc), but this operation can be very slow, as it will copy whole text of the control to some local memory and than copy a sum back to control. So
this method is pretty bad:
telep.Text = telep.Text + Clipboard.GetText();
Finally, the ultimate solution for append should combine cursor manipulation with
SelectedText
property.
string newText = Clipboard.GetText();
telep.SelectionStart = telep.TextLength;
telep.SelectionLength = 0;
telep.SelectedText = newText;
This is very important to use the property
TextLength
, not
Text.Length
, otherwise it will again be very slow.
This is a final answer for append.
You may also want to remember and restore previous selection after appending. Use the properties
SelectionStart
and
SelectionLength
shown above.
—SA