Re: Gauges

Posted by Joey p12386 on May 15, 2007

In Reply to Gauges posted by Jamie Medlen on May 12, 2007


I'm not 100% sure on what your doing but here goes.

To work out a percentage add all the timers values together then divide each timer by that number, multiply that answer by 100 and waalaa you have a percentage.


Timer1 50
Timer2 75
Timer3 100

Add these and you get 225.


50 / 225 = 0.2222 x 100 = 22.22

Yey now you got a percentage round that number using Round() and then set that value to the Guage1.Progress value and there you have it.

Im not sure if you using a variable to count timer hits interval or what so you'll have to fill in the delphi.

If this isn't what your after can you please further explain.

Hope that help ^_^

: I have three timers on my form. I want to find the percentage time elapsed by each timer of the total time elapsed (time of all timers accumulated) and then present these percentage values within a gauge. (Sorry, this may not be very clear, but i'm struggling to make it easier to understand!)

: The problem is that I do not know how to use a gauge. Furthermore, is it possible to transport the values within a gauge to a stringgrid?

: Thankyou,

: Jamie

Related articles


Follow Ups