graphical update for loop

i have a project here that takes a long time to load.
(Creating objects at runtime and activating the objects, both in a for loop)

Now I wanted to display this with a progress bar. Unfortunately the graphical update does not work. The Positionupdate works. I have load the progress actual position in a Memo, with the Add-Function. this works

In Delphi I solved that with a thread including a progress bar.

Is this referring to changing in code the property WebProgressBar.Position?
I cannot see an issue with this here.


i needed that in the function "Show".

if I do it in a timer function it works.
Think the problem is the place on the function "show".
Will try to solve the whole thing differently.

I can use it in delphi "Activate" (= "Show" ??),
but I have to refresh or repaint the Progressbar.
( Progressbar.Refresh;

Which function actually represents the function activate?
Create, Paint, Show are available in delphi and WebCore. activate not available in WebCore.

procedure Tfm_Start.WebFormShow(Sender: TObject);
   i               : byte;
  pb_Start.Position := 0;

  if ProgStart then begin
    pb_Start.Position := pb_Start.Position + 10;

    for i := 1 to 20 do begin
      WebProjektGrafik.paSite[i].Tag := 0;
      siteAktiv := i;
      AnzSite(true,false); // in this function 1..1000 -> pb_Start.Position := pb_Start.Position + 1;

      pb_Start.Position := pb_Start.Position + 10;