Autor Beitrag
detke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

WIN XP
Delphi 5
BeitragVerfasst: Mo 13.08.07 10:18 
Hi,

Ich suche einen Code mit dem ich den Text in einem Memofeld kopieren kann.
Ich mein wie wenn man in markiert und dann Kopiert, bloß möchte ich das auf einen Button machen also wenn man auf den Button klick soll er den Text im Memofeld kopieren.


Moderiert von user profile iconAXMD: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Mo 13.08.2007 um 12:27
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 13.08.07 10:22 
Moin!

user profile icondetke hat folgendes geschrieben:
Ich suche einen Code mit dem ich den Text in einem Memofeld kopieren kann.
Ich mein wie wenn man in markiert und dann Kopiert, bloß möchte ich das auf einen Button machen also wenn man auf den Button klick soll er den Text im Memofeld kopieren.

Beim Kopieren gibt es zwei Objekte, eine Quelle und ein Ziel. Du hast die Quelle angegeben, aber was ist das Ziel? :nixweiss: Ich rate mal: die Zwischenablage. :arrow: TMemo.CopyToClipboard;

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
detke Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

WIN XP
Delphi 5
BeitragVerfasst: Mo 13.08.07 10:38 
Thx aber leider habe ich auch keine Quelle angegeben ich brauche den Kompletten Code um ein memo in die Zwischenablage zu Kopieren.
Aber trozdem Danke.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 13.08.07 10:41 
Moin!

user profile icondetke hat folgendes geschrieben:
Thx aber leider habe ich auch keine Quelle angegeben

Wenn du schon nicht weißt, wohin der Text aus dem Memo kopiert werden soll, dann kann dir keiner helfen - inklusive dir selbst... :?!?:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
detke Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

WIN XP
Delphi 5
BeitragVerfasst: Mo 13.08.07 10:49 
Nene ich brauche den Kompletten code um den Text in einem Memofeld in die Zwischenablage zu Kopieren und so ist die Quelle das Memofeld.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 13.08.07 11:05 
aha und was mit dem Quelltext den Narses gepostet hat ?

mfg
little-wolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 47

WinXP
Delphi 5 Enterprise, Delphi 2006 Enterprise
BeitragVerfasst: Mo 13.08.07 11:05 
moin detke

eigentlich hat dir narses bereits alles gesagt was du wissen brauchst.
einziges was noch ist, man muss erst den kompletten zu kopierenden text markieren, damit copytoclipboard auch kopiert...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.SelectAll;
  Memo1.CopyToClipboard;
end;



gruss

little-wolf
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 13.08.07 11:06 
lol so viele synchronposter ;)

mfg
detke Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

WIN XP
Delphi 5
BeitragVerfasst: Mo 13.08.07 11:15 
THX an euch alle!!!
Wenn ich jetzt noch wüsste wie man Zeilenumbrüche in einem Memofeld erzeugt.
Chryzler
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1097
Erhaltene Danke: 2



BeitragVerfasst: Mo 13.08.07 11:18 
user profile icondetke hat folgendes geschrieben:
THX an euch alle!!!
Wenn ich jetzt noch wüsste wie man Zeilenumbrüche in einem Memofeld erzeugt.

Pro Thread bitte immer nur eine Frage. Müsste auch in den Forumregeln irgendwo stehen..
little-wolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 47

WinXP
Delphi 5 Enterprise, Delphi 2006 Enterprise
BeitragVerfasst: Mo 13.08.07 11:19 
z. B. so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.Lines.Add(#13);
end;


bzw. einfach eine leerzeile einfügen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.Lines.Add('');
end;


Zuletzt bearbeitet von little-wolf am Mo 13.08.07 11:25, insgesamt 1-mal bearbeitet
detke Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

WIN XP
Delphi 5
BeitragVerfasst: Mo 13.08.07 11:22 
Naja egal