Einzelnen Beitrag anzeigen

silver-moon-2000

Registriert seit: 18. Feb 2007
Ort: Schweinfurt
170 Beiträge
 
Delphi XE Professional
 
#8

AW: edit Feld auf ein bestimmtes Wort untersuchen

  Alt 27. Feb 2012, 19:49
if SameText(edit1.text, 'Weil') and SameText(edit1.text, 'Und') then label1.caption := 'Sehr Gut!' ;
Hier widerspreche ich Dir einfach mal, denn das würde nie funktionieren. SameText untersucht ja den gesamten String und nicht einen Teilstring.
if (edit1.text = 'Weil') and (edit1.text = 'Und')... ist ja identisch (bis auf Groß/Kleinschreibung) und das liefert auch immer False.

Zitat von Delphi OH:
Compares two strings by ordinal value without case sensitivity.

SameText compares S1 and S2 and returns True if they are equal.
Du meinst vielleicht eher ContainsText oder ContainsStr ?

[edit]roter kasten, where art thou?
Tobias
Bitte nicht hauen , ich weiß es nicht besser
  Mit Zitat antworten Zitat