Hi guys, I use a CustomListView to display a list of items, filled by "AddTextItem" method (it represents a "TO DO" list). It would be useful to move each item up or down to reflect a priority property. Is there a way to "MOVE" items or, at least to swap two of them (both text and value...
www.b4x.com
Probably we need to supply more information / code if this is no help.
did search again the forum and run into add to list and then to customlistview
problem is I only add last name to the list from the database
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Type Person (Name As String, plase As String)
End Sub
Sub Globals
Public Persons As List
Public per As Person
End Sub
add database to the list
Do While Crsr.NextRow
per.Name = Crsr.GetString("name")
per.plase = Crsr.GetString("plase")
Persons.Add(per)
Loop
Button click I only get one name
Persons.SortType("Name", True)
For i = 0 To Persons.Size - 1
'Dim p As Person
per = Persons.Get(i)
Log(per.Name)
Next
Do While Crsr.NextRow
Dim per As Person
per.Name = Crsr.GetString("name")
per.plase = Crsr.GetString("plase")
Persons.Add(per)
Loop
Persons.SortType("Name", True)
For i = 0 To Persons.Size - 1
Dim per As Person
per = Persons.Get(i)
Log(per.Name)
Log(per.plase)
Next