B4J Question Choice Box Selections

Cody Gradert

New Member
I want to reference my choice box selection in other parts of the code. For instance, if Choice box selection 1 is chosen, do this, but if selection 2 is chosen follow these rules. Can anyone help??
 

Erel

Administrator
Staff member
Licensed User
B4X:
If ChoiceBox1.SelectedIndex = 0 Then ...
'or:
Dim SelectedItem As String = ChoiceBox1.Items.Get(ChoiceBox1.SelectedIndex)
If SelectedItem = "selection 1" Then
 
Top