|
-
May 19th, 2002, 04:30 PM
#1
Thread Starter
yay gay
how to use a listbox with multiple selected entrys?
how to work with them?
how do i know the 1st row index and the last one? and the others? tks
-
May 19th, 2002, 04:33 PM
#2
-= B u g S l a y e r =-
could u elaborate a bit please ?
-
May 19th, 2002, 04:34 PM
#3
-= B u g S l a y e r =-
Not sure about this, but is this what u mean?
VB Code:
Private Sub Command1_Click()
'get checked items
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then Debug.Print List1.List(i)
Next i
End Sub
-
May 19th, 2002, 04:36 PM
#4
Thread Starter
yay gay
-
May 19th, 2002, 04:37 PM
#5
Thread Starter
yay gay
ah but look that will loop thruogh all files and if i have 1000++ files it will be 'boring' to the user see all that looping...anyways of 'hiding' it?
-
May 19th, 2002, 04:43 PM
#6
-= B u g S l a y e r =-
Originally posted by PT Exorcist
ah but look that will loop thruogh all files and if i have 1000++ files it will be 'boring' to the user see all that looping...anyways of 'hiding' it?
not sure what u mean... just tested it on 1000 items... doesnt "show anything boring" at all?
-
May 19th, 2002, 04:45 PM
#7
Thread Starter
yay gay
and how to make a routine to delete them all? i tryed...
VB Code:
For i = 0 To List1.ListCount
List1.Selected(i) = True
If List1.Selected(i) = True Then List1.RemoveItem (i)
i = i + 1
Next
not working right thu :|
-
May 19th, 2002, 04:47 PM
#8
-= B u g S l a y e r =-
now I'v tested it on 10000 itmes... still no boring action 
if u want to delete items, go through the list backwards... like this
VB Code:
Private Sub Command1_Click()
Dim i As Long
For i = List1.ListCount - 1 To 0 Step -1
If List1.Selected(i) Then List1.RemoveItem i
Next i
End Sub
-
May 19th, 2002, 04:49 PM
#9
Thread Starter
yay gay
yes u right just some stupid supostion i made because i thought he would have to select each and every single line lol just forget it nvm
-
May 19th, 2002, 04:53 PM
#10
-= B u g S l a y e r =-
ok 
did the delete routine work as u wanted it to ?
-
May 19th, 2002, 04:55 PM
#11
Thread Starter
yay gay
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
|