Okay guys this is pretty easy, yet I simply am not sure what to search to find the answer. I have a checked list box. I want it to work kind of like a drop down list where you can have a text field that is displayed and a value field that is the actual value used.
In my checked list box, I am adding a list of files in a given directory. I created a sloppy class to test the above and I'm not getting the results expected.
files = Directory.GetFiles(fldrdlgTargetFolder.SelectedPath)
For Each strFile In files
chk.fullfile = strFile
chk.shortfile = strFile.Substring(strFile.LastIndexOf("\"))
chk = New chunk
All of this is in the Form1 class. So is the following definiton for the class chunk:
Private Class chunk
Public fullfile As String
Public shortfile As String
Like I said, this was just meant to be quick and dirty. I am trying to display the shortfile attribute of chunk in the checkedlistbox. When I get the items that are selected, I want to the attribute fullfile from the chunk object stored for the given item(s).
When the program runs the text displayed for each item added is: FileCopier.Form1 + chunk
Am I missing something small or just barking up the wrong tree with this?