Solved

Reverse Countdown

Posted on 2007-11-27
4
191 Views
Last Modified: 2010-04-21
Hi Experts,

I am trying to do the following but no luck yet! Hope you can help!

Using a progressbar I am setting the position to a countdown from Edit1.text.

So I've created an Integer Variable and Assigned it to the Initial Number, which I've also set as the
progressbar .max.

Do basically everytime something happens it's counting down.

Now, what I need to do is have another variable that will count up everytime the edit counts down
so I can assign that variable to the progressbar position.

I hope this makes sense to you ;o)

How could I do this please?

Thanks

ST3VO
0
Comment
Question by:ST3VO
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:MerijnB
ID: 20361475
I don't understand your question.

What is in Edit1.Text?
What is triggering the 'countdown'?
0
 

Author Comment

by:ST3VO
ID: 20361516
The countdown is the ListView.items.count

Then it goes through a loop and everytime to in loops it counts the number of lines left in the listview.

I've put the countdown to show in a TEdit.

Suppose the initial ListView count is 150

Then I've assigned to progressbbar.max position to 150

I don't want to progressbar to go from 150 to 0

I need it to go from 0 to 150

So I want to somehow, assign another variable that will Increment everytime the value of the
countdown descreases.

Hope this helps :o)

Thanks

ST3VO
0
 
LVL 19

Accepted Solution

by:
MerijnB earned 500 total points
ID: 20361537
how about:
progressbar.position := progressbar.max - listview.items.count;

Open in new window

0
 

Author Closing Comment

by:ST3VO
ID: 31411298
Perfect! Thanks a million :o)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now