Am 31.10.2013 10:56, schrieb FreeMan:
Ah, wait. Now I get your problem. You need to use "IndexOf" instead of "IndexOfName". The latter is for cases where the TStrings instance contains name-value pairs (like "Foobar=blubb") whereby this will return the index of the name-value pair with name "Foobar". For your case you need to use "IndexOf" which checks the complete string.No any non-ASCII characters, 'Admin', 'xxxxx' this to strings added in items TmpStr:= 'Admin' I := EDT_User.Items.IndexOfName(TmpStr); or I := EDT_User.Items.IndexOfName('Admin'); same result
Regards, Sven -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
