Autor Beitrag
JaketheSnake
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 149

XP
D5 Prof.
BeitragVerfasst: So 25.09.05 09:44 
Hallo erstma

ich hab ein kleines Programm geschrieben . Es gibt aber ein Fehler beim speichern von .txt dateien.
Vielleicht könnt ihr mir helfen warum in der .txt datei vor jeder Zeile /par ... steht.


ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, ComCtrls, DBCtrls;

type
  TForm1 = class(TForm)
    RichEdit1: TRichEdit;
    BitBtn1: TBitBtn;
    Label1: TLabel;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    WordWrap1: TCheckBox;
    BitBtn4: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
    procedure RichEdit1Change(Sender: TObject);
    procedure BitBtn4Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;





var
  Form1: TForm1;


implementation

{$R *.DFM}

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
     close;
end;

procedure TForm1.BitBtn2Click(Sender: TObject);

begin
    RichEdit1.Text := Stringreplace(RichEdit1.text, ' ',#13,[rfreplaceall]);

end;


procedure TForm1.BitBtn4Click(Sender: TObject);
begin
     Richedit1.lines.Savetofile('Pass.txt');
end;


end.


Das funz ungefaähr so, dass ich einen Text in das Richedit kopiere , dann auf button2 clicke.
Daraufhin stehen alle Wörter untereinander . Nur beim speichern stimmmt was nicht.

Moderiert von user profile iconraziel: Delphi-Tags repariert.

_________________
Good, better , best
SAiBOT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 323
Erhaltene Danke: 6

XP SP2; 7
D7; D2009
BeitragVerfasst: So 25.09.05 09:49 
PlainText muß auf True (RichEdit), oder du speicherst es als .rtf!
JaketheSnake Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 149

XP
D5 Prof.
BeitragVerfasst: So 25.09.05 09:52 
Yo danke es funktioniert :D :D :D :!:

_________________
Good, better , best