Autor Beitrag
René R.Fo.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 116

Win7
Delphi5 Delphi2005
BeitragVerfasst: Mo 17.08.09 17:14 
Hallo
Ich entschuldige mich im voraus wenn diese Frage bereits gestellt wurde.

Wie kann ich aus einem RichEdit einen Buchstaben über einen Button Ändern
ausblenden Delphi-Quelltext
1:
If (Form1.RichEdit1.Text = 'A') then Form1.RichEdit1.Text := '213';					

Das ist mein bisheriger Code aber wenn hinter dem A ein Buchstabe steht geht das nicht.
bitte helfen


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Mo 17.08.2009 um 18:27
Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt

_________________
If Promille or Cannabis.Volumen > IQ then
dec(Gehirnzellen.Anzahl);
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 17.08.09 17:30 
Versuch es mal mit StringReplace.
René R.Fo. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 116

Win7
Delphi5 Delphi2005
BeitragVerfasst: Mo 17.08.09 18:03 
Und wie soll das gehen? Wo soll ich das einsetzen?

_________________
If Promille or Cannabis.Volumen > IQ then
dec(Gehirnzellen.Anzahl);
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 17.08.09 18:10 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
Form1.RichEdit1.Lines.BeginUpdate;
try
  Form1.RichEdit1.Text := StringReplace(Form1.RichEdit1.Text,'A','213',[]);
finally
  Form1.RichEdit1.Lines.EndUpdate;
end;