F fatman Active Member Licensed User Longtime User Feb 21, 2013 #1 Hi to all, having just discovered this excellent class i have a question i could not find a solution so far: is it possible that searchview shows all items by default? After typing something into the edit field the list shall collapse to the found/matching items. If someone got an idea how to get that i would be glad for a hint... Fatman
Hi to all, having just discovered this excellent class i have a question i could not find a solution so far: is it possible that searchview shows all items by default? After typing something into the edit field the list shall collapse to the found/matching items. If someone got an idea how to get that i would be glad for a hint... Fatman
Erel B4X founder Staff member Licensed User Longtime User Feb 21, 2013 #2 1. Add a global variable: Code: Copy Private allItems As List 2. Set it in SetItems: Code: Copy allItems = Items 3. In et_TextChanged: Code: Copy If New.Length < MIN_LIMIT Then AddItemsToList(allItems, "") Return End If You can manually call et_TextChanged to show the list when the program starts. Upvote 0
1. Add a global variable: Code: Copy Private allItems As List 2. Set it in SetItems: Code: Copy allItems = Items 3. In et_TextChanged: Code: Copy If New.Length < MIN_LIMIT Then AddItemsToList(allItems, "") Return End If You can manually call et_TextChanged to show the list when the program starts.
F fatman Active Member Licensed User Longtime User Feb 21, 2013 #3 Thank you very much! I will try this out. Fatman Upvote 0
F fatman Active Member Licensed User Longtime User Feb 22, 2013 #4 Sorry Erel disturbing you... Everything works fine but I have no idea how to call et_TextChanged manually. Seaching for this topic did not deliver very much. Glad as always if you can give me an example. Thx Fatman Upvote 0
Sorry Erel disturbing you... Everything works fine but I have no idea how to call et_TextChanged manually. Seaching for this topic did not deliver very much. Glad as always if you can give me an example. Thx Fatman
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2013 #5 Make it public and call sv.et_TextChanged("", "") Upvote 0
F fatman Active Member Licensed User Longtime User Feb 22, 2013 #6 While looking at your code i wondered how to call "et_TextChanged" manually because it´s private... But changing it to public was obviously too much for me ;-) Thanks again! Fatman Upvote 0
While looking at your code i wondered how to call "et_TextChanged" manually because it´s private... But changing it to public was obviously too much for me ;-) Thanks again! Fatman