Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb_dotnet thread: Multi-select in Directory list box and File list box


Message #1 by "Seth Bembeneck" <sbembeneck@c...> on Thu, 16 May 2002 23:06:21
I figured out a working solution:

dim dir as string

for each dir in lstDir.selectedItems
  lstTempList.items.add(lstDir.Path + "\" + lstDir.GetItemText(dir))
next

Seth


> How do I get the selected items from the directory and file list box? 
B> oth boxes can have multiple selections. I have two buttons, one to 
copy 
t> he selected items in the dir box to a list box and an other button to 
c> opy the selected items in the file box to the same list box for 
example:

> private sub cmdAddDir etc...
 >    
 >    dim i as integer

>     for i = 0 to lstDirList.????? 'What do I loop through?
 >             lstCopyList.items.add(lstDirList.??????) 'Where do I get 
my 
I> tems from?

>     Next i

> 
T> he above code would be the same for button two, just changing from the 
D> ir list box to the file one.

> Thanks
S> eth

  Return to Index