|
-
Mar 11th, 2004, 02:43 PM
#1
Thread Starter
New Member
How do I scan the contents of a listbox and add a value if it doesn't exist in list?
What I am trying to do is check the contents of a list box to find out if the value the user entered in a text box already exists in the list box. If it does, I'll display something like "This value already exists in the list". If not, I'll add the value to the listbox. I think I need to scan the contents of the listbox using a loop, but I can't get the syntax right. Help please.
-
Mar 11th, 2004, 02:47 PM
#2
See my post in this thread.
-
Mar 11th, 2004, 03:01 PM
#3
Thread Starter
New Member
Thanks, but I'm affraid I'm not too familiar with the syntax in your example. The contents of my listbox will never be too large, so I think it would be easy for me to use a loop. Still not sure of the syntax I'd use though. I tried it a few different ways, but kept ending up in an infinite loop, and had to do the "cntr+alt+delete" thing a few times.
-
Mar 11th, 2004, 03:04 PM
#4
Well my code uses an APi and you can pretty much use my code as-is. If you have questions about it I'd be glad to help. If you really want to use a loop, see Wokawidget's post in the same thread.
-
Mar 11th, 2004, 03:33 PM
#5
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
|