|
-
May 11th, 2006, 04:11 AM
#1
Thread Starter
New Member
Listview
Hello,
I´m kind of stock on two things I wanna do with my listview. I want to view all files from different folders on the same listview. I Know I have to add the 2 file arrays containing my files from each forder, nut how do i add them? Another question is how do i pick a file and open that file just by clicking on it in listview... If someone could help me on this i would really be grateful, thanks in advance,
Wave397
-
May 11th, 2006, 05:14 AM
#2
Re: Listview
 Originally Posted by wave397
Hello,
I´m kind of stock on two things I wanna do with my listview. I want to view all files from different folders on the same listview. I Know I have to add the 2 file arrays containing my files from each forder, nut how do i add them? Another question is how do i pick a file and open that file just by clicking on it in listview... If someone could help me on this i would really be grateful, thanks in advance,
Wave397
Hi,
You could try this;
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ListItem1 As ListViewItem
ListItem1 = ListView1.Items.Add("Item 1")
ListItem1 = ListView1.Items.Add("Item 2")
End Sub
Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged
If ListView1.SelectedIndices.Count > 0 Then
TextBox1.Text = "You selected item " & (ListView1.SelectedIndices(0) + 1)
End If
End Sub
Hope it's a start,
sparrow1
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
|