|
-
Nov 10th, 2003, 02:37 AM
#1
Thread Starter
Frenzied Member
Listview problem
I am merging from being a good asp.net programmer to a good vb.net programmer... and it is going quite slowly, mainly because the win32 form components don't behave like I want them to Here is my problem. Im using this code:
VB Code:
Dim di As New DirectoryInfo("C:\temp")
ListView1.BeginUpdate()
ListView1.Items.Clear()
Dim fi As FileInfo
For Each fi In di.GetFiles
Dim item As New ListViewItem(fi.Name)
ListView1.Items.Add(item)
item.SubItems.Add(fi.Length)
item.SubItems.Add(fi.CreationTime)
item.SubItems.Add(fi.LastWriteTime)
Next
ListView1.EndUpdate()
this is straight from Balenas book on vb.net. this should fill a listview with rows, each row contains info on one file.
My problem is... if I select the "view" style, I only get the first column and a checkbox, all subitems are gone...
and if I select "details" I get empty rows...
what's the problem?
many thanks for your help!
yours
Henrik
Last edited by MrNorth; Nov 10th, 2003 at 02:43 AM.
-
Nov 10th, 2003, 03:01 AM
#2
try addig columns to the listview
umm and which page of his book is that
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 10th, 2003, 03:59 AM
#3
Thread Starter
Frenzied Member
The page is 814-816 of the book "visual basic.net core reference"
I will try it with columns, but I still have to make listitems and subitems right?
kind regards
Henrik
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
|