Before you re-enable the controls do an Application.Processmessages; to
clear any crap left in the buffer then it should see the control is diabled
and not process the action.
-----Original Message-----
From: John Christenhusz <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Friday, 9 April 1999 14:00
Subject: [DUG]: Disable action on re-enabled controls
>Hi all,
>
>I have a form with a number of controls, like buttons, dropdown
>listboxes and tabs.
>At the click of a button a process is started taking some time. Before
>activating the task I disable a number of controls on the form, like the
>dropdown listbox and tabs.
>This works all fine, when I click one of the disabled controls they
>don't work: Yoo-hoo, just what I want!
>But <snip> after the task is completed and I re-enable the controls, the
>last clicked (disabled) control gets activated (e.g. tab changes or
>dropdown listbox drops its list.
>
>Is there any way to flush that (last) click event before re-enabling the
>controls, or any other solution?
>
>Thanks very much for your help.
>
>John Christenhusz
>POSTEC DATA SYSTEMS Ltd.
>PO Box 302-230
>Auckland, New Zealand
>E-mail: [EMAIL PROTECTED]
>Phone: 09-415.8803
>Fax: 09-415.9042
>
>
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz