B4J Question [ABMaterial]: How to set Text from AutoComplete id value?

Mashiane

Expert
Licensed User
Longtime User
Ola

ABM 4 came up with an option to add autocomplete as if one uses ABMCombo..

B4X:
Dim inp1 As ABMInput
inp1.Initialize(page, "inp1", ABM.INPUT_TEXT, "First Name", False, "inputauto")
inp1.AutoCompleteType = ABM.AUTOCOMPLETE_STARTS
inp1.AutoCompleteOpenOnFocus = True ' NEW
inp1.ReadOnly = True ' OPTIONAL
inp1.AutoCompleteShowArrow = True ' TO MIMIC THE COMBO ARROW
inp1.AddAutoComplete("1", "Alain")
inp1.AddAutoComplete("2", "Jos")
inp1.AddAutoComplete("3", "Carine")
inp1.AddAutoComplete("4", "Mams")
inp1.AddAutoComplete("5", "Paps")
inp1.AddAutoComplete("6", "Paul")
inp1.AddAutoComplete("7", "Pauline")
inp1.AddAutoComplete("8", "Pandora")
inp1.AddAutoComplete("9", "Pieter")
inp1.AddAutoComplete("10", "Philip")
inp1.AddAutoComplete("11", "Porter")
page.Cell(2,1).AddComponent(inp1)

I am able to get the text value for example of 1 saved to my db if I select Alain, when reading back from the db, I want Alain to show by setting 1. How do I achieve this?
 
Top