Hi Dallon
More detailed explanation of how the code works.
1) Whatever text string is in the TextBox "TextBox_Find" is used to find a match in one of the Lists
2) To narrow the search down to a specific list, e.g. gListA, gListB etc, the first Character of the text string is used. So:
Let's say the text string to find is "andafy"
The code on Button_Find gets the first character, which will be "a", and calls the Procedure SelectList to narrow down the search, which will therefore be "gListA".
3) The FindText Procedure searches "gListA" for the StringToFind "andafy". What it finds is the complete List Item that contains "andafy".
The List Item found is "andafy|abroad" - so you can see that if the StringToFind was the English word "abroad", the find result would be the same.
4) If the StringToFind is indeed found, it is temporarily stored in a two-item "mini list" called "ResultListPair".
The items in "ResultListPair" are in this order:
Index 1: "andafy"
Index 2; "abroad"
This is always true, whether the search was for "andafy" or for "abroad".
5) On the app GUI, there is a label to display the find result "Label_Result"
If the StringToFind was "andafy", we would want to display the English word "abroad" as the result, so we would set the "Label_Result" text to Index 2;
If the StringToFind was "abroad", we would want to display the Malagasy word "andafy" as the result, so we would set the "Label_Result" text to Index 1;
6) Note that the example above only works because both the English word and the Malagasy word are in a List that exists. To complete the code you need to add the other lists (via the Backpack, as explained before) and the SelectList Procedure needs expanding to include those other lists. Also, some lists are missing completely - there were no words in Malagasy starting with "x" for example.
7) You could add an option to your GUI:
o Search for English Word Meaning in Malagasy
o Search for Malagasy Word Meaning in English
... and enhance the result reporting accordingly with an "If Then Else"