Autor Beitrag
Pegasusowl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Do 27.07.06 09:18 
hallo, folgendes Problem eines Anfängers........

Ich habe ein Memofeld und ein Editfeld

Im Memofeld steht ein langer Text und ich möchte das dieser Text nach dem Vorhandensein des Inhaltes des Editfeldes durchsucht wird und dann eine Message kommt wenn der Text vorhanden ist....

Wie durchsucht man ein Memofeld? allerdings ohne einen "FindDialog"

Wäre toll wenn jemand Rat weiß
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 27.07.06 09:19 
Den gesamten Inhalt eines Memos erhälst du mit memo.Lines.Text dies kannst du dann mit Pos(ex) durchsuchen.

_________________
Markus Kinzler.
freak4fun
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 604
Erhaltene Danke: 4

Win 7 Pro
VS 2013 Express, Delphi, C#, PHP, Java
BeitragVerfasst: Do 27.07.06 10:15 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if (Pos(Edit1.Text, Memo1.Text)) = 0 then
  ShowMessage(Edit1.Text + ' wurde nicht gefunden.')
else
  ShowMessage(Edit1.Text + ' wurde gefunden.');


Bei der Suche wird Groß-/Kleinschreibung unterschieden.

MfG
freak

_________________
"Ich werde auf GAR KEINEN Fall…!" - "Keks?" - "Okay, ich tu's."
i++; // zaehler i um 1 erhoehen