|
-
Feb 1st, 2002, 09:02 AM
#1
Thread Starter
Fanatic Member
ListView
How can I know the text in a column of a list?
-
Feb 1st, 2002, 09:06 AM
#2
VB Code:
MsgBox ListView1.SelectedItem.Text
-
Feb 2nd, 2002, 03:10 PM
#3
Thread Starter
Fanatic Member
But what if I need to combine the text of two columns? (I have four)
-
Feb 2nd, 2002, 03:30 PM
#4
Hyperactive Member
Code:
MsgBox ListView1.SelectedItem.Text & ListView2.SelectedItem.Text
Power to 2000 Electronic Donkeys!
www.edonkey2000.com
I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".
-
Feb 3rd, 2002, 09:02 AM
#5
Thread Starter
Fanatic Member
I meant two colomns in one ListView....
-
Feb 3rd, 2002, 11:09 AM
#6
Addicted Member
this is how
For Each ListItemX In ListView1.ListItems
If ListItemX.Selected = True Then
ListItemX.SubItems(ListView1.ColumnHeaders("Code").SubItemIndex)
End If
Next ListItemX
-
Feb 3rd, 2002, 12:56 PM
#7
Hyperactive Member
Power to 2000 Electronic Donkeys!
www.edonkey2000.com
I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".
-
Feb 3rd, 2002, 02:26 PM
#8
Thread Starter
Fanatic Member
I don't understand what you wrote...
What variable is the two texts from the listview1?
-
Feb 3rd, 2002, 02:29 PM
#9
Stuck in the 80s
VB Code:
ListView1.SelectedItem.Text
Will give you the 1st columns text of the selected item.
VB Code:
ListView1.SelectedItem.ListSubItems(1).Text
Will give you the 2nd columns text of the selected item.
VB Code:
ListView1.SelectedItem.ListSubItems(2).Text
Will give you the 3rd columns text of the selected item.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|