G grafsoft Well-Known Member Licensed User Longtime User May 22, 2013 #1 Hi, this code does not work: Sub Globals Dim th As TabHost ... end sub ... th.Initialize ("TabChanged") Activity.AddView(th, 0, 0, 98%x, 98%y) ... Sub TabChanged(tabname As String) ' the program never gets here end sub I can also submit the whole project ... thanks Peter
Hi, this code does not work: Sub Globals Dim th As TabHost ... end sub ... th.Initialize ("TabChanged") Activity.AddView(th, 0, 0, 98%x, 98%y) ... Sub TabChanged(tabname As String) ' the program never gets here end sub I can also submit the whole project ... thanks Peter
yttrium Active Member Licensed User Longtime User May 22, 2013 #2 grafsoft said: Hi, this code does not work: Code: Sub Globals Dim th As TabHost ... end sub ... th.Initialize ("TabChanged") Activity.AddView(th, 0, 0, 98%x, 98%y) ... Sub TabChanged(tabname As String) ' the program never gets here end sub I can also submit the whole project ... thanks Peter Click to expand... I think your initialization line should look like: Code: th.Initialize ("th") and your TabChanged: Code: Sub th_TabChanged(tabname As String) End Sub Last edited: May 22, 2013 Upvote 0
grafsoft said: Hi, this code does not work: Code: Sub Globals Dim th As TabHost ... end sub ... th.Initialize ("TabChanged") Activity.AddView(th, 0, 0, 98%x, 98%y) ... Sub TabChanged(tabname As String) ' the program never gets here end sub I can also submit the whole project ... thanks Peter Click to expand... I think your initialization line should look like: Code: th.Initialize ("th") and your TabChanged: Code: Sub th_TabChanged(tabname As String) End Sub
thedesolatesoul Expert Licensed User Longtime User May 22, 2013 #3 Code: Sub TabChanged_TabChanged Upvote 0
G grafsoft Well-Known Member Licensed User Longtime User May 23, 2013 #4 Thanks, but in both cases I get "sub th_Tabchanged" (or Tabchanged_Tabchanged) signature does not match expected signature. Upvote 0
Thanks, but in both cases I get "sub th_Tabchanged" (or Tabchanged_Tabchanged) signature does not match expected signature.
NJDude Expert Licensed User Longtime User May 23, 2013 #5 You have this which is wrong: Code: Sub th_TabChanged(tabname As String) ... thedesolatesoul gave you the right syntax above. Upvote 0
You have this which is wrong: Code: Sub th_TabChanged(tabname As String) ... thedesolatesoul gave you the right syntax above.
klaus Expert Licensed User Longtime User May 23, 2013 #6 You should use either: Sub th_TabChanged or Sub TabChanged_TabChanged depending in the initialization. You must remove (tabname As String) , the TabChange event has no parameter ! Best regards. Upvote 0
You should use either: Sub th_TabChanged or Sub TabChanged_TabChanged depending in the initialization. You must remove (tabname As String) , the TabChange event has no parameter ! Best regards.
G grafsoft Well-Known Member Licensed User Longtime User May 24, 2013 #7 Thank you! Now it works. Upvote 0