Forum: Sonstige Fragen zu Delphi
Delphi
by Aya,
19. Aug 2003
Hi,
na dann halt einfach nochne leerzeile dazu ;)
procedure TForm1.RichEdit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key=VK_RETURN then begin
RichEdit1.SelAttributes.Color:=clRed;
RichEdit1.SelText:=#13#10+'
Forum: Sonstige Fragen zu Delphi
Delphi
by Aya,
19. Aug 2003
Hi,
das ganze geht noch viel leichter... ;)
mit Richedit.SelText kannst du einen Text an der CursorPosition einfügen:
procedure TForm1.RichEdit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key=VK_RETURN then begin
RichEdit1.SelAttributes.Color:=clRed;