Autor Beitrag
teamwkl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: So 28.08.05 11:41 
Hallo!

Hab ein Programm mit 2 Forms (das Hauptprogramm..in dem ein richedit feld gefuellt wird) und ein 2. form in dem man sich eine vorschau vor dem drucken angucken kann.... wie erreiche ich das das richedit feld genau den gleichen inhalt hat wie das im hauptprogramm??

ausblenden Delphi-Quelltext
1:
richedit2 := form1.richedit1;					


das geht nicht...aber sowas in der art muesste doch moeglich sein oder??

Moderiert von user profile iconTino: Code- durch Delphi-Tags ersetzt.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: So 28.08.05 11:47 
So vielleicht:

richedit2.Lines.Assign (form1.richedit1.Lines);
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 28.08.05 11:49 
Oder einfach so?
ausblenden Delphi-Quelltext
1:
RichEdit2.Text := Form1.RichEdit1.Text;					

_________________
We are, we were and will not be.
teamwkl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: So 28.08.05 11:55 
danke funktioniert beides....nur uebergibt er die formatierungen nicht mit!!!

wie muss ich das denn machen??
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 28.08.05 12:03 
So gehts auch mit Formatierungen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
var str: TMemorystream;
{...}
  str := TMemorystream.Create;
  Richedit1.Lines.SaveToStream(str);
  str.Position:=0;
  RichEdit2.Lines.LoadFromStream(str);
  str.Free;

_________________
We are, we were and will not be.
teamwkl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: So 28.08.05 12:21 
hmmm geht irgendwie nicht....text bleibt unformatiert :(
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: So 28.08.05 12:47 
Hast du PlainText auf False stehen?