I want the user to be able to select a contact from the list of contacts and then select a phone number from the selected contact's list of phone numbers. So I added this code to Erel's ContactUtils code to create the list of phone numbers for the contact
For Each phone As cuPhone In cu.GetPhones(c.Id)
sbp.Append(phone.Number & ", " & phone.PhoneType).Append(CRLF)
Next
lstPhonenums.AddSingleLine2(sbp.ToString,phone.Number)
and then I added this sub to allow the user to select from the contact's list of phone numbers generated from the above sub
Sub lstPhonenums_ItemClick (Position As Int, Value As Object)
lblPhonenum.Text=""
lblPhonenum.Text=Value
End Sub
However when the user clicks on the first phone number in the list (lstPhonenums) the second of the two numbers appears in the labelview (lblPhonenum). How can I get the first number selectable?
Attached is the complete code zipped.
For Each phone As cuPhone In cu.GetPhones(c.Id)
sbp.Append(phone.Number & ", " & phone.PhoneType).Append(CRLF)
Next
lstPhonenums.AddSingleLine2(sbp.ToString,phone.Number)
and then I added this sub to allow the user to select from the contact's list of phone numbers generated from the above sub
Sub lstPhonenums_ItemClick (Position As Int, Value As Object)
lblPhonenum.Text=""
lblPhonenum.Text=Value
End Sub
However when the user clicks on the first phone number in the list (lstPhonenums) the second of the two numbers appears in the labelview (lblPhonenum). How can I get the first number selectable?
Attached is the complete code zipped.