Jump to content

eduardosuruagy

uniGUI Subscriber
  • Posts

    845
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by eduardosuruagy

  1. 1 hour ago, Sherzod said:

    If I understand you correctly, for example like this:

    
    procedure TMainForm.UniButton1Click(Sender: TObject);
    var
      i: Integer;
    begin
      ShowProgress('Please Wait...');
      UniSession.Synchronize;
    
      for i := 1 to 200 do
      begin
        Sleep(500);
        UpdateProgress(i/200, Format('%%%f Completed', [(i*100)/200]));
        UniSession.Synchronize;
      end;
      HideProgress;
      ShowToast('Process Finished');
    end;

     

    That's right, but it's still showing 0.5 in 0.5. Can you show from 1% to 1%?

  2. 26 minutes ago, Hayri ASLAN said:

    Hi,

    you can use like this. But in this time you will get 100 request from clientside to update progress. So it is not suitable for web apps. 

     

    
    procedure TMainForm.UniButton1Click(Sender: TObject);
    var
      i: Integer;
    begin
      ShowProgress('Please Wait...');
      UniSession.Synchronize;
    
      for i := 1 to 100 do
      begin
        Sleep(500);
        UpdateProgress(i, Format('%%%d Completed', [i]));   
        UniSession.Synchronize;
      end;
      HideProgress;
      ShowToast('Process Finished');
    end;

     

    I wish if the total was 1000 progress would show from 1 to 100%

    if it was 10,20,30,500 or etc. progress showed from 1 to 100%

×
×
  • Create New...