hi,
when i add some items to my ChoiceBox view, The displayed item is empty and when i write ( CK_Search.SelectedIndex = 0 ), sub ( Private Sub CK_Search _SelectedIndexChanged(Index As Int, Value As Object) ) is performed and my code is running. what should i do to when i set my items, it shows the first item without performed _SelectedIndexChanged sub.
when i add some items to my ChoiceBox view, The displayed item is empty and when i write ( CK_Search.SelectedIndex = 0 ), sub ( Private Sub CK_Search _SelectedIndexChanged(Index As Int, Value As Object) ) is performed and my code is running. what should i do to when i set my items, it shows the first item without performed _SelectedIndexChanged sub.
B4X:
dim CK_Search As ChoiceBox
'.... Initialize,AddNode
CK_Search.Items.Add("20")
CK_Search.Items.Add("50")
CK_Search.Items.Add("100")
CK_Search.Items.Add("Show all")
CK_Search.SelectedIndex = 0 ' this code