Hello my Friends.
Working with D2 in W98SE.
The property "Enabled", does it really enable or disable the related control ???. Here's a simple example:
procedure Button1.OnClick(Sender: TObject);
begin
Button1.Enabled:= false;
... Do the process required, it takes some seconds
Button1.Enabled:= true;
end;
Simple code for preventing the user to re-start the execution of the process while it's running.
But If you click again (accidentally?) on this disabled button while the process is being executed, the process will be executed again after the line 'end' is reached. Furthermore, the number of times you click the button while it's disabled, the number of times the process will be executed.
This happens not only to buttons but to other controls too; checkboxes, TEdit's etc. Even though they look disabled, any action with the mouse or keystrokes on them, whill be evident when they become enabled again. What is happening and how can I turn them 'insensible' when they're disabled?.
I'll appreciate so much your comments.
Working with D2 in W98SE.
The property "Enabled", does it really enable or disable the related control ???. Here's a simple example:
procedure Button1.OnClick(Sender: TObject);
begin
Button1.Enabled:= false;
... Do the process required, it takes some seconds
Button1.Enabled:= true;
end;
Simple code for preventing the user to re-start the execution of the process while it's running.
But If you click again (accidentally?) on this disabled button while the process is being executed, the process will be executed again after the line 'end' is reached. Furthermore, the number of times you click the button while it's disabled, the number of times the process will be executed.
This happens not only to buttons but to other controls too; checkboxes, TEdit's etc. Even though they look disabled, any action with the mouse or keystrokes on them, whill be evident when they become enabled again. What is happening and how can I turn them 'insensible' when they're disabled?.
I'll appreciate so much your comments.