Jump to content


Photo

General Question


  • Please log in to reply
2 replies to this topic

#1 Syrob

Syrob
  • Members
  • 13 posts

Posted 13 August 2010 - 04:42 AM

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?



#2 PhilW

PhilW
  • Members
  • 75 posts

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? :

CODE
   NxButton1.Enabled := False;
   try
      //some work here
   finally
      NxButton1.Enabled := True
   end;



Hope this helps
Regards
PhilW

#3 Syrob

Syrob
  • Members
  • 13 posts

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