Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Text an Cursorposition einfügen (https://www.delphipraxis.net/9955-text-cursorposition-einfuegen.html)

Nalincah 8. Okt 2003 15:12


Text an Cursorposition einfügen
 
Wie kann ich in einem Memo Text an der aktuellen Cursorposition einfügen?

Alexander 8. Okt 2003 15:18

Re: Text an Cursorposition einfügen
 
Delphi-Quellcode:
    Memo1.SetSelTextBuf('TEST);
ungetestet ;-)

Nalincah 9. Okt 2003 07:41

Re: Text an Cursorposition einfügen
 
Also wie du das geschrieben hat, klappt es. Nur so leider nicht

Delphi-Quellcode:
Memo1.SetSelTextBuf(' ' + TButton(Sender).Caption + ' ');
und so auch nicht

Delphi-Quellcode:
Memo1.SetSelTextBuf(' ' + PChar(TButton(Sender).Caption) + ' ');
Fehler:
[Fehler] uFrmDesignExpression.pas(96): Inkompatible Typen: 'String' und 'PChar'

Mirilin 9. Okt 2003 09:00

Re: Text an Cursorposition einfügen
 
:hi:

Delphi-Quellcode:
MemoText.SelText := EditInsertText.Text;

Alexander 9. Okt 2003 09:39

Re: Text an Cursorposition einfügen
 
Delphi-Quellcode:
  Memo1.SetSelTextBuf(PChar(' ' + TButton(Sender).Caption + ' '));

Nalincah 9. Okt 2003 09:40

Re: Text an Cursorposition einfügen
 
Danke....Klappt!!


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:11 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz