i have code similar to the following...i want to set it up to reference via sender rather than having the code repeated multiple times (NOTE: there would be more than just the 2 sections below)...but what i'm not sure of how to do would be to reference the view via the code similar to what i did in VB...eg frmMain.controls("lblBalP" & lbl.tag).text
any thoughts would be great
any thoughts would be great
B4X:
Sub lblBalP1_Click
If lblCurScore.Text = "" Then Exit Sub
lblBalP1.Text = Round(lblBalP1.Text - lblCurScore.Text)
lblScoresP1.Text = lblCurScore.Text & CRLF & lblScoresP1.Text
lblCurScore.Text = ""
btn00.Visible = False
End Sub
Sub lblBalP2_Click
If lblCurScore.Text = "" Then Exit Sub
lblBalP2.Text = Round(lblBalP2.Text - lblCurScore.Text)
lblScoresP2.Text = lblCurScore.Text & CRLF & lblScoresP2.Text
lblCurScore.Text = ""
btn00.Visible = False
End Sub