Autor Beitrag
Mr. Hunt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: So 21.09.08 16:15 
Hallo

Ich habe RE1 und RE2.

Jetzt möchte ich sagen;

ausblenden Delphi-Quelltext
1:
RE1.SelText:=RE2.Text					


Aber bei mir ist wichtig das es eins zu eins kopiert wird, also mit Font, das funktioniert aber nicht. und der font in RE1 ist auch schon unterschiedlich!!

wie kann ich das machen?

MfG


Moderiert von user profile iconNarses: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am So 21.09.2008 um 23:13
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: So 21.09.08 20:11 
Probier mal Lines.Text aus, ich glaube, das kopiert auch die Formatierung mit. Sicher bin ich mir aber nicht.

ausblenden Delphi-Quelltext
1:
RE1.Lines.Text:=RE2.Lines.Text					

Wozu eigentlich das SelText? Möchtest du, dass nur die aktuelle Markierung überschrieben wird? Das wird schwierig, falls in Lines.Text auch die RichEdit-Formatierung drinsteht. SelStart bzw. SelLen geben die Anzahl der tatsächlichen Zeichen an, nicht inklusive der Formatierungs-Tags.
tif
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46
Erhaltene Danke: 1

Winxxx
TP, BP, Delphi 1 - 2009
BeitragVerfasst: Mo 22.09.08 12:38 
Hallo,

ich würde sagen, probiere mal mit WM_COPY & co, also Kopieren über das Clipboard. Das ist zwar blöd, aber sonst kommt die Formatierung nicht mit an die gewünschte Stelle (seltext).

Viel Erfolg.
Tino
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 22.09.08 16:32 
gibt es bei dem RichText denn eine Methode assign? Denn das wäre die, die du nehmen solltest. Ansonten:
Das RichEdit in einen MemoryStream speichern und das andere aus diesem Stream laden lassen.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
galagher
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2562
Erhaltene Danke: 46

Windows 10 Home
Delphi 10.1 Starter, Lazarus 2.0.6
BeitragVerfasst: Mo 22.09.08 16:58 

_________________
gedunstig war's - und fahle wornen zerschellten karsig im gestrock. oh graus, es gloomt der jabberwock - und die graisligen gulpen nurmen!