Mislim da je bilo rečeno da se ne može napraviti ali evo:
Program refresh;
var
i: integer;
elm: TElement;
MessForm: TForm;
messLab1: TLabel;
startTime: TDateTime;
procedure Print(poruka: string);
begin
if Application.MainForm <> nil then begin
end;
end;
procedure rcRefreshElm(elm: TElement);
begin
if elm <> nil then begin
elm.RecalcFormula(elm);
Application.ProcessMessages;
end;
end;
procedure ShowCompletionMessage;
begin
MessForm := TForm.Create(nil);
MessForm.Caption := ‘Osvjezavanje gotovo’;
MessForm.BorderStyle := bsDialog;
MessForm.FormStyle := fsStayOnTop;
MessForm.Position := poScreenCenter;
MessForm.Width := 300;
MessForm.Height := 120;
MessForm.Color := clBtnFace;
messLab1 := TLabel.Create(MessForm);
messLab1.Parent := MessForm;
messLab1.Left := 15;
messLab1.Top := 30;
messLab1.Width := MessForm.ClientWidth – 30;
messLab1.Font.Size := 12;
messLab1.Alignment := taCenter;
messLab1.Caption := ‘Osvjezavanje gotovo’;
MessForm.Show;
Application.ProcessMessages;
startTime := Now;
while (Now – startTime) < (2/86400) do begin
Application.ProcessMessages;
end;
MessForm.Close;
MessForm.Free;
MessForm := nil;
end;
Begin
Print(‘Skripta refresh element start’);
if e <> nil then begin
rcRefreshElm(e);
end else begin
if ElmHolder <> nil then begin
for i := 0 to ElmHolder.Elementi.Count – 1 do begin
elm := TElement(ElmHolder.Elementi.Items[i]);
rcRefreshElm(elm);
end;
end;
end;
Print(‘Skripta refresh element end’);
ShowCompletionMessage;
End.
Save this code into .cps file and look for project.ini file. Edit project.ini to add this code.