M MattC Member Licensed User Longtime User Jul 14, 2013 #1 I'm having trouble editing editboxes and labels within a scrollview. Code to add my editbox within Activity_Create: Code: Copy Dim edt1 As EditText edt1.Initialize("edtStuff") edt1.text = "" edt1.Gravity = Gravity.CENTER_VERTICAL pnl.AddView(edt1, 140, pnl.height , 120dip, height) Once added I cannot find how to "address" it, I'm thinking it's something to do with initialising it (despite that being done in Activity_Create above). I thought I could just do this: Code: Copy edtStuff.text="New Stuff" But this results in an undeclared variable I declare the variable but while there are no errors there is also no change to the editbox: Code: Copy Dim edtholding As EditText edtholding.text="New Stuff" I've searched and read many threads but i haven't seen how this is done, examples seem to set the value during Activity_Create but not change after that. It's also possible I'm missing something very basic that nobody else asks about.
I'm having trouble editing editboxes and labels within a scrollview. Code to add my editbox within Activity_Create: Code: Copy Dim edt1 As EditText edt1.Initialize("edtStuff") edt1.text = "" edt1.Gravity = Gravity.CENTER_VERTICAL pnl.AddView(edt1, 140, pnl.height , 120dip, height) Once added I cannot find how to "address" it, I'm thinking it's something to do with initialising it (despite that being done in Activity_Create above). I thought I could just do this: Code: Copy edtStuff.text="New Stuff" But this results in an undeclared variable I declare the variable but while there are no errors there is also no change to the editbox: Code: Copy Dim edtholding As EditText edtholding.text="New Stuff" I've searched and read many threads but i haven't seen how this is done, examples seem to set the value during Activity_Create but not change after that. It's also possible I'm missing something very basic that nobody else asks about.
M MattC Member Licensed User Longtime User Jul 14, 2013 #2 Bah, found it in another activity in the same project: Code: Copy Dim pnl As Panel pnl = ScrollView1.Panel Dim lbl As Label lbl = pnl.GetView(0) lbl.Text="success!" :signOops: Upvote 0
Bah, found it in another activity in the same project: Code: Copy Dim pnl As Panel pnl = ScrollView1.Panel Dim lbl As Label lbl = pnl.GetView(0) lbl.Text="success!" :signOops: