As title says briefly, I'm trying to use the default option +Sort alphabetic order in ComboBox to have a nice visual layout of a list of names.
This is great everything is simple for this part.
Now what I'm doing is that everytime a user completes the action in GUI, my .ini data file with name's list will be reordered in terms of the most recent used.
For example, if you just used "Walmart" as your last choice, when you complete the action, this name will be removed from where it was in the .ini file then repositionned in first place.
Code: Select all
New_Fournisseurs_IniListe:= "|" LastActiveClientFournisseur RegExReplace(Fournisseurs_IniListe,"\|" LastActiveClientFournisseur "\|","|")
;--------------------------------------------------------------------------------
IniDelete, Data.ini, Fournisseurs, Fournisseurs_IniListe
IniWrite, %New_Fournisseurs_IniListe%, Data.ini, Fournisseurs, Fournisseurs_IniListe ; nouvelle liste créer ici
IniRead, Fournisseurs_IniListe, Data.ini, Fournisseurs, Fournisseurs_IniListe ; refresh variable containing names
GuiControl,,ComboBox1, % "|" Fournisseurs_IniListe ; refresh ComboBox names from new list's var
The AutoComplete choice will always be dependant on the ComboBox sort mode which is alphabetic.
How can you still keep visual layout of alphabetic order with the ComboBox names,
but also let the AutoComplete be the first match according to the .ini data's "recently used names" order.
As a last example, if you have ten names starting with "The ...something" - how can you AutoComplete with the "Most recently" used name starting with "The...."?
What I have tried is:
1: Removing +Sort from comboBox to see if it works and it does. But this is not what I want.
2: Temporarily change to -Sort in the ComboBox just before GuiControl, ChooseString happens. But it doesnt work
Do you have an idea how to do this please?