aplelois
asked on
listbot
hello,
I have a listbot that has 5 names coming from an ini file
and a label called names.
when you open the program you see Name: Person1
but when I select Person3 in the listbox it doesnt show
in the label, how can I do this?
I have a listbot that has 5 names coming from an ini file
and a label called names.
when you open the program you see Name: Person1
but when I select Person3 in the listbox it doesnt show
in the label, how can I do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
well, I got a problem cause I have
first name
last name
email
ini file is
fist;last;email@dom.com;
so when I add in LabelName it only shows up the name
first name
last name
ini file is
fist;last;email@dom.com;
so when I add in LabelName it only shows up the name
Does listbox contain all fields?
I think you need ListView for this. It can contain three columns for first name, last name and email. Handle SelectedIndexChanged event and fill label with three fields or make three labels for every field.
I think you need ListView for this. It can contain three columns for first name, last name and email. Handle SelectedIndexChanged event and fill label with three fields or make three labels for every field.
ASKER
now it only shows the name
ASKER
ok listview sound great!
ASKER
I would like to show something like this
First Name: person1
Last Name: person2
Email: email
so when the ppl select the name from the listbox
it changes the infotmation to the person
how would I do that? something simple!
First Name: person1
Last Name: person2
Email: email
so when the ppl select the name from the listbox
it changes the infotmation to the person
how would I do that? something simple!
Suppose you have ListView with three columns and three lables.
Private Sub ListView1_SelectedIndexCha nged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles ListView1.SelectedIndexCha nged
Dim items As ListView.SelectedListViewI temCollect ion = _
Me.ListView1.SelectedItems
if ( items.Count > 0 ) then
LabelName.Text = items(0).SubItems(0).Text
LabelLastName.Text = items(0).SubItems(1).Text
LabelMail.Text = items(0).SubItems(2).Text
end if
End Sub
Private Sub ListView1_SelectedIndexCha
Handles ListView1.SelectedIndexCha
Dim items As ListView.SelectedListViewI
Me.ListView1.SelectedItems
if ( items.Count > 0 ) then
LabelName.Text = items(0).SubItems(0).Text
LabelLastName.Text = items(0).SubItems(1).Text
LabelMail.Text = items(0).SubItems(2).Text
end if
End Sub
ASKER
how do I add a label to the listview I cant find the way
ASKER