to avoid selecting text try this:
void __fastcall TForm1::RichEdit1MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
RichEdit1->SelLength = 0;
}
void __fastcall TForm1::RichEdit1KeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
RichEdit1->SelLength = 0;
}
see also this post from BTecho: thread101-449481