Non-ending progress-bar animation lazarus / 39-Graphics ---------------------------------------------------------------------- flasher86 · 2011-01-05 21:17 Hi there, I would like to know if it is possible to have a specific type of progressbar, the one that is well know from Windows 7 where there is no knowing when the process will be finished so it just animates continously. If i remember it is called marquee style progress bar? Please, help me out. ---------------------------------------------------------------------- typo · 2011-01-05 22:28 ProgressBar has a marquee style, but it seems not to be what you want. Perhaps you can do it with a TPanel  and a timer. ---------------------------------------------------------------------- User137 · 2011-01-05 23:32 When you set style property to pbstMarquee it starts animating even in the IDE design mode. For me it looks exactly like this in lazarus (though this picture is not taken by me): http://i.msdn.microsoft.com/dynimg/IC100842.png ---------------------------------------------------------------------- typo · 2011-01-05 23:37 On a TPanel you can do something like this: Code: [Select]var   x :integer = 10;   y :integer = 3;   Direction :boolean; procedure TForm1.Timer1Timer(Sender: TObject); begin   Panel2.Canvas.Pen.Color := clForm;   Panel2.Canvas.Brush.Color := clForm;   Panel2.Canvas.Ellipse(x,y,x+10,y+10);   Panel2.Canvas.Ellipse(x+10,y,x+20,y+10);   Panel2.Canvas.Ellipse(x+20,y,x+30,y+10);   Panel2.Canvas.Ellipse(x+30,y,x+40,y+10);   if Direction then     Inc(x, 10)   else     Dec(x, 10);   Panel2.Canvas.Pen.Color := clSkyBlue;   Panel2.Canvas.Brush.Color := clSkyBlue;   Panel2.Canvas.Ellipse(x,y,x+10,y+10);   Panel2.Canvas.Ellipse(x+10,y,x+20,y+10);   Panel2.Canvas.Ellipse(x+20,y,x+30,y+10);   Panel2.Canvas.Ellipse(x+30,y,x+40,y+10);   if (x > Panel2.Width - 50) or (x < 10) then     Direction := not Direction; end; ---------------------------------------------------------------------- eny · 2011-01-06 09:32 Quote from: flasher86 on January 05, 2011, 10:17:04 pm so it just animates continouslyYeah, very annoying  It's not really a progress bar because it doesn't show progress anymore. It's just eye candy. ---------------------------------------------------------------------- typo · 2011-01-06 13:30 You should use Application.ProcessMessages on your code. ---------------------------------------------------------------------- flasher86 · 2011-01-06 19:14 Ehh, There is a lot of delphi packages for this but I am unable to port it. First of all, why it isnt supported by lazarus by default? Plzzz ---------------------------------------------------------------------- typo · 2011-01-06 19:16 Probalby because it is not a control, it is just a graphic component. ---------------------------------------------------------------------- User137 · 2011-01-16 01:07 Quote from: flasher86 on January 06, 2011, 08:14:14 pmEhh, There is a lot of delphi packages for this but I am unable to port it. First of all, why it isnt supported by lazarus by default?You haven't yet specified what kind of progressbar you are after. The lazarus marquee option should do exactly what you are asking. Doing some other than default Windows look you may have to draw by yourself. A screenshot of the wanted result? ---------------------------------------------------------------------- Laksen · 2011-01-16 08:53 Quote from: flasher86 on January 06, 2011, 08:14:14 pmEhh, There is a lot of delphi packages for this but I am unable to port it. First of all, why it isnt supported by lazarus by default? Plzzz What? It's supported. Just set Style to pbstMarquee