Android Question happilySolved:TabStrip variables

anOparator

Active Member
Licensed User
Longtime User
How to make Label1.Text = EditText1. Text become Label"VARIABLE".Text = EditText"VARIABLE".Text
B4X:
Sub TabStrip1_PageSelected (Position As Int)
...
...
'Label1.Text = EditText1.Text  ' works, of course
'How to convert to Label"VARIABLE".Text = EditText"VARIABLE".Text
End Sub
 

Attachments

  • tmp_TabStrip test939470302.zip
    11.5 KB · Views: 117

anOparator

Active Member
Licensed User
Longtime User
B4X:
Private Views As Map
...

Sub Activity_Create
 'LoadLayout
 Views = CreateMap("Label1": Label1, "Label2": Label2, "EditText1": EditText1, ...)

 Dim lbl As Label = Views.Get("Label" & Variable)
 Dim edt As EditText = Views.Get("EditText" & Variable)
 lbl.Text = edt.Text
Thanks a bunch for the pointers, once I found the Sub with the unknown VARIABLE the flowchart fell into place.
 
Upvote 0
Top