Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Mit button , edit text kopieren (https://www.delphipraxis.net/55347-mit-button-edit-text-kopieren.html)

Coldice111 19. Okt 2005 22:11


Mit button , edit text kopieren
 
Hi!Ich würde gerne mit einem button den Text aus einer Edit rauskopieren.
geht nicht:
Delphi-Quellcode:
Edit1.text.CopytoClipboard;
und
Edit1.CopytoClipboard;
Wie kann mann es umformen?

cu coldice111

Rastaman 19. Okt 2005 22:16

Re: Mit button , edit text kopieren
 
Als unit Clipbrd einbinden und dann so

Delphi-Quellcode:
  Clipboard.AsText := Edit1.Text;

Coldice111 19. Okt 2005 22:18

Re: Mit button , edit text kopieren
 
danke es geht
cu coldice 111

arbu man 19. Okt 2005 22:24

Re: Mit button , edit text kopieren
 
Wenn du die Unit Clipbrd nicht benutzen willst möchtest gibt es auch noch eine andere Lösung

Delphi-Quellcode:
Edit1.SelectAll;
Edit1.CopytoClipboard;
Edit1.CopytoClipboard ist so asob man Strg+C im edit drückt, da aber normalerweise kein Text markiert ist wird auch nichts kopiert.
Edit1.SelectAll; markiert den gesamten text im Editfeld


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:59 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