Delphi Progress bar

Question

I have a test project that I am working on. It has a trackbar and a progress bar on the form, I have the following code for the trackbar
Progressbar1.Position := Progressbar1.Position + 1
As the track bar is going up, it increases the progress bar. Can the trackbar be set so when it is decreased the progressbar will decrease as well?

Answer

For increasing the progress bar, you use:
Progressbar1.Position := Progressbar1.Position + 1;

To decrease it:
Progressbar1.Position := Progressbar1.Position - 1;

Members of the DelphiLand Club can access the full version of our tutorials, including all fully commented source code files.

Click here to become a DelphiLand Club member.


 
FAQ