I am using Rich Text object in my C# application. The only issue I am having is that when user pastes formated text from another app, it remains formated which I cannot have. Is
I achieved this by udpating the font and colour for the whole RTB when its contents are changed. This works fine for me as the entry box does not need to deal with huge amounts of text.
public FormMain()
{
InitializeComponent();
txtRtb.TextChanged += txtRtb_TextChanged;
}
void txtRtb_TextChanged(object sender, EventArgs e)
{
RichTextBox rtb = (RichTextBox)sender;
rtb.SelectAll();
rtb.SelectionFont = rtb.Font;
rtb.SelectionColor = System.Drawing.SystemColors.WindowText;
rtb.Select(rtb.TextLength,0);
}