Hi'
I have a button on a list view item panel that triggers a sub. The sub needs to pick up the SelectedIndex of a B4xCombo on the same list view panel:
When I create the list view item I "tag" the views within the items with their name in the tag field:
This technique has worked for color pickers, labels and textFields, but I can't get it to work with the B4xCombo box e.g.
How can I get the combo box values?
Best regards
Rob
I have a button on a list view item panel that triggers a sub. The sub needs to pick up the SelectedIndex of a B4xCombo on the same list view panel:
B4X:
'======================================================================================================
Sub btnApplyFcn_Click
Dim index As Int = curveListView.GetItemFromView(Sender)
Dim p As Pane = curveListView.GetPanel(index)
'Get the function ID
For Each cmb As B4XView In p.GetAllViewsRecursive
If cmb Is B4XComboBox Then
If cmb.tag <> "" Then Log("Tag = " & cmb.tag)
If cmb.Tag = "spinFiltSel" Then
Dim cp As ComboBox
cp = cmb
uRec.ID = spinFunctionMap.GetKeyAt(cp.SelectedIndex)
End If
End If
Next
End Sub
When I create the list view item I "tag" the views within the items with their name in the tag field:
B4X:
spinFiltSel.Tag = "spinFiltSel"
This technique has worked for color pickers, labels and textFields, but I can't get it to work with the B4xCombo box e.g.
B4X:
'======================================================================================================
Sub getTextFieldStringValue (tagName As String, index As Int) As String
Dim p As Pane = curveListView.GetPanel(index)
For Each v As B4XView In p.GetAllViewsRecursive
If v Is TextField Then
If v.Tag = tagName Then
Return v.Text
End If
End If
Next
End Sub
How can I get the combo box values?
Best regards
Rob