Hi,
I am having a problem with various objects added to a scrollview that is a tab in a TabHost. I am unable to get spinner & textbox values of these items. I can create them OK, I can populate the spinners OK. But afterwards, in the rest of the program, you are unable to get the spinSendEOB.SelectedIndex, it always returns value zero no matter which item has been selected, and txtSendBefore.text is always blank, no matter what has been typed in.
Is it possible to get the values without having to resort to using tags ? Thanks.
Code fragments...........
Sub Globals
Dim scvMain As ScrollView
Dim TabHost1 As TabHost
Dim spinSendEOB,spinCharDelay,spinReceiveEOB As Spinner
dim txtSendBefore As EditText
end sub
Sub Activity_Create(FirstTime As Boolean)
.
.
.
.
scvMain.Initialize(100%y)
TabHost1.AddTab ( "Send", "tab1")
TabHost1.AddTab2("Settings",scvMain)
FillScrollView
end sub
Sub FillScrollView
i = 0
' add a label
Dim lbl As Label
lbl.Initialize("lbl1")
lbl.Color = Colors.black
lbl.Text = "Some Text"
scvMain.Panel.AddView(lbl,0, i*lblHeight1, lblWidth, lblHeight)
' add a spinner
spinSendEOB.Initialize("spinSendEOB")
spinSendEOB.Add("CR/LF")
spinSendEOB.Add("LF/CR/CR")
spinSendEOB.Add("LF")
spinSendEOB.Add("CR")
scvMain.Panel.AddView(spinSendEOB,lblWidth,i*lblHeight1,objwidth,lblHeight+2)
' add a text box
txtSendBefore.Initialize("txtSendBefore")
scvMain.Panel.AddView(txtSendBefore,2*lblWidth,i*lblHeight1,objwidth,lblHeight+2)
end sub
I am having a problem with various objects added to a scrollview that is a tab in a TabHost. I am unable to get spinner & textbox values of these items. I can create them OK, I can populate the spinners OK. But afterwards, in the rest of the program, you are unable to get the spinSendEOB.SelectedIndex, it always returns value zero no matter which item has been selected, and txtSendBefore.text is always blank, no matter what has been typed in.
Is it possible to get the values without having to resort to using tags ? Thanks.
Code fragments...........
Sub Globals
Dim scvMain As ScrollView
Dim TabHost1 As TabHost
Dim spinSendEOB,spinCharDelay,spinReceiveEOB As Spinner
dim txtSendBefore As EditText
end sub
Sub Activity_Create(FirstTime As Boolean)
.
.
.
.
scvMain.Initialize(100%y)
TabHost1.AddTab ( "Send", "tab1")
TabHost1.AddTab2("Settings",scvMain)
FillScrollView
end sub
Sub FillScrollView
i = 0
' add a label
Dim lbl As Label
lbl.Initialize("lbl1")
lbl.Color = Colors.black
lbl.Text = "Some Text"
scvMain.Panel.AddView(lbl,0, i*lblHeight1, lblWidth, lblHeight)
' add a spinner
spinSendEOB.Initialize("spinSendEOB")
spinSendEOB.Add("CR/LF")
spinSendEOB.Add("LF/CR/CR")
spinSendEOB.Add("LF")
spinSendEOB.Add("CR")
scvMain.Panel.AddView(spinSendEOB,lblWidth,i*lblHeight1,objwidth,lblHeight+2)
' add a text box
txtSendBefore.Initialize("txtSendBefore")
scvMain.Panel.AddView(txtSendBefore,2*lblWidth,i*lblHeight1,objwidth,lblHeight+2)
end sub