#Region Project Attributes
#ApplicationLabel: Example
#Version: 1.0.0
'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
#iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
#iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private tv As TableView
Private lst As List
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
CallSubDelayed(Me,"LoadTableview")
End Sub
Private Sub Application_Background
End Sub
Private Sub LoadTableview
tv.Initialize("Tv",True)
lst.Initialize
lst.Add("Item1")
lst.Add("Item2")
lst.Add("Item3")
lst.Add("Item4")
lst.Add("Item5")
lst.Add("Item6")
For i=0 To lst.Size -1
Dim at As AttributedString
at.Initialize(lst.Get(i),Font.CreateNew(21),Colors.Black)
Dim tc As TableCell = tv.AddSingleLine("")
tc.Text = at
Next
Page1.RootPanel.AddView(tv,0,0,100%x,100%y)
End Sub
Private Sub tv_SelectedChanged (SectionIndex As Int, Cell As TableCell)
Dim tv1 As TableView
Dim tc As TableCell
Dim celllst As List
tv1=Sender
celllst = tv1.GetItems(SectionIndex)
For i=0 To celllst.Size -1
tc=celllst.Get(i)
If tc.Text.ToString=Cell.Text.ToString Then
Exit
End If
Next
Dim str As String=lst.Get(i)
'Msgbox(str,"Selected")
Page1.ResignFocus
'Deeper.ShowDeeper(str)
CallSubDelayed2(Deeper,"ShowDeeper",str)
End Sub