|
-
Jul 29th, 2000, 04:28 AM
#1
Thread Starter
Addicted Member
Hiyas,
I'm not exactly a VB expert, so please help me out here. =)
How do I remove a selected item in a ListBox? I tried using .RemoveItem, but it needs an index value, and now I'm stuck.
Thanks,
-Git
-
Jul 29th, 2000, 04:30 AM
#2
Lively Member
the inde value is the number f the item u wanna delete
YC Sim
Teenage Programmer
UIN 37903254
-
Jul 29th, 2000, 04:33 AM
#3
Thread Starter
Addicted Member
How do I get the value though?
Thanks,
-Git
-
Jul 29th, 2000, 04:43 AM
#4
Well ....
Very Basic......
Here is the answer, kiddo.
When you display a list box full of some values, its .ListIndex property is -1. When a user clicks on any item in the list, the .ListIndex property contains the index of that item. So you have to write..
List1.RemoveItem(List1.ListIndex)
Does it help?
-
Jul 29th, 2000, 04:48 AM
#5
Thread Starter
Addicted Member
Thanks mate - works perfectly. =]
-Git
-
Jul 29th, 2000, 05:06 AM
#6
New Member
The Index start from 0 at the top of the ListBox.
Am I right?
Very glad to see you !
I'm a very begginer!
-
Jul 29th, 2000, 06:50 AM
#7
Lively Member
yeah, the first item is 0
second item is 1 and so on...
YC Sim
Teenage Programmer
UIN 37903254
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
|