Autor Beitrag
bruce185
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

winXP
D7 Ent
BeitragVerfasst: Do 17.08.06 20:49 
hallo,
also, ich versuche grad mit eine if abfrage herauszufinden ob ein Word in Edit1 vorhanden ist.
es soll geprüft werden ob in Edit1 das hier steht "Hallo"
wenn ich auf den Button dann klicke und in Edit1 steht z.B. xhalloihr
dann soll die if trotzdem ausgeführt werden, weil da ja mitten im text hallo steht.
Wisst ihr wie ich das anstellen kann?

MFG Andreas
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 17.08.06 20:50 
Pos()

ausblenden Delphi-Quelltext
1:
if Pos( 'Hallo', Edit1.Text) > 0 then //gefunden					

_________________
Markus Kinzler.
bruce185 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

winXP
D7 Ent
BeitragVerfasst: Do 17.08.06 20:57 
cool, danke dir
des funktioniert :D

Gruss Andreas
bruce185 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

winXP
D7 Ent
BeitragVerfasst: Do 17.08.06 21:02 
aber wie mache ich das gross und klein schreibung keine rolle spielt?
weil es geht nur wenn ich klein schreibe?

MFG Andreas
Danniolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 693



BeitragVerfasst: Do 17.08.06 21:05 
ausblenden Delphi-Quelltext
1:
if Pos('hallo', lowercase(Edit1.Text)) > 0 then //gefunden					

sollte das eigentlich machen