Progressbar in Statusbar lazarus / 31-LCL ---------------------------------------------------------------------- dietmar · 2021-09-19 20:02 Hi, how can I place a progress bar in a panel of my status bar? Thx, --Dietmar ---------------------------------------------------------------------- wp · 2021-09-19 21:18 Quote from: dietmar link=topic=56367.msg418795#msghow can I place a progress bar in a panel of my status bar? Put the progressbar anywhere on the form and hide it. When you start the process, set the Progressbar.Parent to the statusbar and adjust its location (this is a bit tricky, IIRC). Finally show the progressbar. At the end of the process, hide it again. ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-09-19 21:35 Hey WP, Quote from: wp on September 19, 2021, 11:18:37 pmPut the progressbar anywhere on the form and hide it. When you start the process, set the Progressbar.Parent to the statusbar and adjust its location (this is a bit tricky, IIRC). Finally show the progressbar. At the end of the process, hide it again. This works perfectly for Windows but I think it fails for Linux GTK2. I seem to remember stumbling on this on another program. But I have to tell you to take this with a grain of salt cuz my memory is crap and I could be remembering it wrong Cheers, Gus ---------------------------------------------------------------------- Zvoni · 2021-09-20 06:53 I remember finding a snippet you could "simulate" a Progressbar anywhere that offers a canvas without using the ProgressBar-Control. But i would have to dig up my Fedora-Hat an Bullwhip and go on a jungle-hunt to find that snippet again.... ---------------------------------------------------------------------- balazsszekely · 2021-09-20 09:38 Works on windows, linux and osx(Lazarus 2.0.12/FPC 3.2.0). You can customize the appearance. ---------------------------------------------------------------------- Zvoni · 2021-09-20 10:10 GetMem, Yep. That's it pretty much ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-09-20 12:57 Hey GetMem, Quote from: GetMem on September 20, 2021, 11:38:16 amWorks on windows, linux and osx(Lazarus 2.0.12/FPC 3.2.0). You can customize the appearance. I now stand corrected and have only one thing to say: AWESOME SAUCE!!! You da man GetMem, thank you so much for this!!! This cures my fear of doing it due to past bad experiences and I'll use it extensively Cheers, Gus ---------------------------------------------------------------------- dietmar · 2021-09-20 13:46 Thx to all of you guys... you are the best as always ;-) --Dietmar ---------------------------------------------------------------------- Paolo · 2021-09-23 14:09 I create the progressbar at fly in this way TForm1... ...     StBar: TStatusBar;     PrBar : TProgressBar; ... end; procedure TForm1.FormCreate(Sender: TObject); begin   ....   PrBar:=TProgressBar.Create(StBar);   PrBar.Parent:=StBar;   ... end; and also (I have the progressbar in a panel with index = cPnlPrBar) procedure TForm1.StBarDrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); begin   if (Panel = StatusBar.Panels[cPnlPrBar]) then     PrBar.BoundsRect:=Rect end;