Dim list1 As List
Dim Item , newChar, oldChar As String
'whatever your data source .. sort it alphabetically first
list1.Initialize
list1.Add("Apples")
list1.Add("Bananas")
list1.Add("Beans")
list1.Add("Figs")
list1.Add("Fish")
list1.Add("Fruit")
list1.Add("Grapes")
list1.Add("Melons")
list1.Add("Mullberrys")
'format your listview
ListView1.SingleLineLayout.ItemHeight = 24dip
ListView1.SingleLineLayout.Label.TextSize = 14
ListView1.SingleLineLayout.Label.Color = Colors.DarkGray
ListView1.SingleLineLayout.Label.TextColor= Colors.LightGray
ListView1.TwoLinesLayout.Label.Left = 20dip
ListView1.TwoLinesLayout.ItemHeight=40dip
ListView1.TwoLinesLayout.Label.TextSize = 18
ListView1.TwoLinesLayout.Label.TextColor= Colors.White
'add listview data
For i = 0 To list1.Size -1
'test for new Alpha .. if so show new alpha prior to item list eg: C Cake
Item = list1.Get(i)
newChar = Item.SubString2(0,1)
If newChar <> oldChar Then
ListView1.AddSingleLine(newChar)
oldChar = newChar
End If
ListView1.Addtwolines(Item,"")
Next