如何在 ComboBox 里找指定的字符串?(0分)

H

holyszq

Unregistered / Unconfirmed
GUEST, unregistred user!
如何在 ComboBox 或 TStringList 里找指定的字符串?谢谢!!!
 
Combobox.items.indexof('找的字符');
 
if StringList.IndexOf('Delphibbs') > -1 then
ShowMessage('找到啦!');

 
if Combobox.Items.IndexOf('sample string') >= 0 then
ShowMessage('found it');
 
顶部