Hi all,
How do I get the value from a B4XPlusMinus object when a button is clicked?
The user will change up/down the value in the B4XPlusMinus and then click the button to accept the changed value.
The B4XPlusMinus and the button are on a Panel on a CustomListView.
The CustomListView has more than one item/panel loaded into it.
So far I have this in code, but the btnAdmit_Click is not passing the syntax checker.
And I'm not sure if this is even the correct way to do it.
Thanx,
Mark Stuart
How do I get the value from a B4XPlusMinus object when a button is clicked?
The user will change up/down the value in the B4XPlusMinus and then click the button to accept the changed value.
The B4XPlusMinus and the button are on a Panel on a CustomListView.
The CustomListView has more than one item/panel loaded into it.
So far I have this in code, but the btnAdmit_Click is not passing the syntax checker.
And I'm not sure if this is even the correct way to do it.
B4X:
Private Sub B4XPlusMinus1_ValueChanged(Value As Object)
Log("PM Value: " & Value)
Dim pm As B4XPlusMinus = Sender
Dim idx As Int = clvCheckin.GetItemFromView(pm.mBase)
Log("idx: " & idx)
End Sub
Private Sub btnAdmit_Click
Dim btn As Button = Sender
Dim btnparent As Panel
btnparent = btn.Parent
btn.Enabled = False
Dim b4xPM As B4XPlusMinus = btnparent.GetView(13) '<<========== fails syntax checker!
Dim q As Int = b4xPM.SelectedValue
Dim lblID as Label = btnparent.GetView(1)
Dim id as String = lblID.Text
Save_Data(id, q)
End Sub
Thanx,
Mark Stuart