Forum > LCL

Progressbar in Statusbar

(1/2) > >>

dietmar:
Hi,

how can I place a progress bar in a panel of my status bar?

Thx,
--Dietmar

jamie:
There is a OnDrawPanel event you can use to simulate a progress bar which is actually better than putting a progress control within it.

wp:

--- Quote from: dietmar link=topic=56367.msg418795#msg ---how can I place a progress bar in a panel of my status bar?

--- End quote ---
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:
Hey WP,


--- Quote from: wp on September 19, 2021, 11:18:37 pm ---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.

--- End quote ---

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:
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....

Navigation

[0] Message Index

[#] Next page

Go to full version