Mensaje    Asunto: Como limitar la longitud de línea de un TMemo Responder citando

code:
void __fastcall TForm1::Memo1KeyUp(TObject *Sender, WORD &Key, TShiftState Shift)
{
TPoint CurrPos=Memo1->CaretPos;
if (CurrPos.x>30)
{
Memo1->Color=clBlack;
Memo1->Hint="MORE THAN 30 CHARACTERS: BACKWARD DELETE TO REDUCE";
}
else if (CurrPos.x>20)
{
Memo1->Color=clRed;
Memo1->Hint="WARNING: more than 20 characters on this line";
}
else if(CurrPos.x>10)
{
Memo1->Color=clAqua;
Memo1->Hint="More than 10 characters on this line";
}
else
{
Memo1->Color=clWindow;
Memo1->Hint="Enter text";
}
}