Getting items from Listview help.

mramos

Member
Licensed User
Longtime User
I am working on a simple ListView and then lookup data program. I scroll to the items, then hit Show Data but I can not quite figure out the Listview1.getitme(?)

Do I need to do anything with the listview is clicked first? See below

B4X:
Sub Globals
   'These global variables will be redeclared each time the activity is created.
   'These variables can only be accessed from this module.
   Dim Label1 As Label
   Dim Metal As Label
   Dim Typeo As Label
   Dim Thick As Label
   Dim Metall As ListView
   Dim Typel As ListView
   Dim Thickl As ListView
   Dim v1 As String
   Dim v2 As String
   Dim v3 As String
End Sub

Sub Activity_Create(FirstTime As Boolean)
   'Do not forget to load the layout file created with the visual designer. For example:
   Activity.LoadLayout("Weldchart")
   Label1.Text="Simple Welding Calculator"
   Metal.Text="Metal"
   Typeo.Text="Type Weld"
   Thick.Text="Thickness"
   Metall.AddSingleLine("Steel/Stainless Steel")
   Metall.AddSingleLine("Aluminum")
   Typel.AddSingleLine("Butt Weld")
   Typel.AddSingleLine("Lap Weld")
   Typel.AddSingleLine("Corner Weld")
   Typel.AddSingleLine("Fillet Weld")
   Thickl.AddSingleLine("1/16")
   Thickl.AddSingleLine("1/8")
   Thickl.AddSingleLine("3/16")
   Thickl.AddSingleLine("1/4")
   Thickl.AddSingleLine("3/8")
   Thickl.AddSingleLine("1/2")
  
  
End Sub

Sub Show_Click
   v1 = Metall.GetItem()
   v2 = Typel.GetItem()
   v3 = Thickl.GetItem()
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 
Top