Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reverse Countdown

Posted on 2007-11-27
4
Medium Priority
?
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

721 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