Edit component let you do incremental search by any char in lines, not only first char. And thats cool !
you just need this little function:
Code: Select all
Gui Add, Edit, ge1 x1 y1 w180 h20 r1 vSearch
Gui Add, ListBox, x1 y21 w180 h400 vSite hwndSite, %sites%
...
; on edit change
e1:
Gui,Submit,NoHide
sitesArr := StrSplit(sites, "|")
newArr := []
newStr := ""
for k,v in sitesArr
{
if InStr(v, Search, false)>0
{
newArr.push(v)
}
}
for k,v in newArr
newStr .= "|" v
GuiControl, , Site, % newStr
GuiControl, Choose, site, 1
Return