|
-
Aug 17th, 2009, 03:02 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Yet Another ListView Question
Hiya People,
Newbie here, I've been trawling these forums, and the net all day. Modified lots of code examples to try and fit my needs. Nothing as yet, have I managed to get to work
I have finally decided to post my own question, so here goes.
I have a CheckedListView (suggested in a post I read, and it seems to fit my needs) which I populate with the filtered names of the files from within a selected folder.
Then the user selects the ones to process, by using the checkboxes. So basically it is a single column text box with checkboxes down the left hand side.
What I've been trying to do is get the selected text (i.e. the name of the file) and put it in a string array for later use.
Please make any answers verbose, as I've not been using .net for very long, and need a bit of spoon feeding.
I've used various forms of: For each item as .....ListViewItem......Next and also various forms of for x = 1 to Listitem.count......Next
e.g.
Code:
Dim DWGListArray() As String
Dim X As Integer = LSCheckedListBox1.Items.Count
Dim Ctr As Integer
For Ctr = 0 To X
If LSCheckedListBox1.Items(Ctr).Checked Then
DWGListArray(Ctr) = LSCheckedListBox1.Items(Ctr).Text
Debug.Print(DWGListArray(Ctr))
End If
Which would you suggest, ensuring that the filename text goes into the str array. Any help would be very much appreciated.
Regards
GB
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
|