|
-
Sep 9th, 2003, 08:58 AM
#1
Thread Starter
Frenzied Member
Cancel a Click event
Hi,
Let's say that a user clicks on a listbox's item, the click event is generated. What if after some validation, the program should move back to the previous index because something is missing etc.
How can I cancel a click event?
I tried to change the listindex to the old one, but that generates another click event.
Thanks,
Don't anthropomorphize computers -- they hate it
-
Sep 9th, 2003, 09:30 AM
#2
Junior Member
I dont know what you mean. Is it just during a process that you want the user to be unable to click on the listbox? Please be more specific, in the mean time would this work -
Code:
List1.Enabled = False
-
Sep 9th, 2003, 09:35 AM
#3
PowerPoster
I tried to change the listindex to the old one, but that generates another click event.
set a boolean variable to false, then change the listindex then set the variable back to true. Test the variable on entry to the click even and if it's false, exit immediately
-
Sep 9th, 2003, 12:36 PM
#4
Fanatic Member
Yep the boolean idea is the best way to go. I do this all the time with data validation and such.
Motto: Anything for a laugh.
Getting second place only means you are the first loser to cross the finish line.
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
|