CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

How can I show a progressbar from 1..100%

by jorgo » 06 Jun 2017 13:03

Hi,
I want to implement a progressbar.
I tested following:

************************
Comonents on Form:
- IWCGJQButton1: TIWCGJQButton;
- CGJQContainer: TIWCGJQRegion;

Progressbar on CGJQContainer:
IWCGJQProgressBar: TIWCGJQProgressBar;

************************
procedure TFORM_Login.IWCGJQButton1JQButtonOptionsClick(Sender: TObject; AParams: TStringList);
var
i : integer;

begin
for i := 1 to 100 do
begin
CGCallBackDisableAjaxResponse;
IWCGJQProgressBar.ResetJSonProps;
IWCGJQProgressBar.JQProgressBarOptions.Value:= i;
IWCGJQProgressBar.JQProgressBarOptions.CaptionType:= pbctPercentage;
IWCGJQProgressBar.JQProgressBarOptions.Animation.Enable:= False;
CGCallBackEnableAjaxResponse;
RenderRegionAsync(CGJQContainer, rramLazyLoadMethod, True);

Sleep(50);
end;
end;
************************
After 5 seconds the progressbar shows only the last value (100%).
How can I show all values from 1% to 100% ?

Kind regards
jorgo
 
Posts: 108
Joined: 13 Jul 2016 15:57

by Alexander Bulei » 06 Jun 2017 17:05

Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by jorgo » 07 Jun 2017 14:55

Hi,

as alternative we found https://forums.embarcadero.com/thread.jspa?messageID=847524

But handling a separate thread is an extra effort.

Kind regards
jorgo
 
Posts: 108
Joined: 13 Jul 2016 15:57

by assapan » 09 Jun 2017 07:14

With Delphi XE ( i don't remember from which version it starts) there is a much more easy way of handling temporary threads like
TTask.Run(
procedure
begin
// do what you have to do
end);
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by assapan » 09 Jun 2017 07:35

See an example of how to use it
You do not have the required permissions to view the files attached to this post.
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France


Return to JQProgressBar

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.