I have a problem repainting a button after changing its caption in the OnClick event.
procedure TForm1.sButton1Click(Sender: TObject);
begin
sButton1.Caption:='NewCaption';
application.ProcessMessages;
// … do something
Sleep(5000);
sButton1.Caption:='oldCaption';
end;
the caption “new caption” is not updated during the function call.
The caption does not update during the processing.
I tried the member functions Update(), Repaint() and Refresh() without any effect.
Joel
Using release 6.05