In the event driven world of Delphi, there are a lot of event handlers for buttons etc.
The event handlers usually do some work. There is nothing to stop a user clicking a button many times and invoking an event while the prior event call is still working.
I know how I do it, but I am interested in how other programmers handle users that ignore the hourglass cursor and keep clicking a button?
General Question
Started by Syrob, Aug 13 2010 04:42 AM
2 replies to this topic
#1
Posted 13 August 2010 - 04:42 AM
#2
Posted 13 August 2010 - 02:11 PM
Hi,
Seems to be question for StackOverflow
http://stackoverflow...s/tagged/delphi
but how about something like this? :
Hope this helps
Regards
PhilW
Seems to be question for StackOverflow
http://stackoverflow...s/tagged/delphi
but how about something like this? :
CODE
NxButton1.Enabled := False;
try
//some work here
finally
NxButton1.Enabled := True
end;
try
//some work here
finally
NxButton1.Enabled := True
end;
Hope this helps
Regards
PhilW
#3
Posted 16 August 2010 - 08:14 PM
Yes, that's one of the ways. Wondering if anyone has any other tricks up their sleeves.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users










