Delphi clock in listview

Posted on 2008-10-21
Last Modified: 2013-11-23
I have a listview component on a form and would like one of the columns to be a clock counting down to zero.

Does anyone know how I can do this?
Question by:alanrogerson2
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
LVL 15

Expert Comment

ID: 22768277
Would this be a different clock for every item in the listview?
LVL 37

Accepted Solution

Geert Gruwez earned 500 total points
ID: 22768284
put a timer on your form which has the ListView

in the OnTimer event change the value of the CountDown
and update the ListView

  TForm1 = class(TForm)
    fCountDown: integer;
procedure TForm1.Timer1OnTimer(Sender: TObject);
  if CountDown > -1 then
    CountDown := CountDown - 1;
    ListView1.Items.Item[0].SubItems[1] := IntToStr(CountDown);
  end else Timer1.Enabled := False;

Author Closing Comment

ID: 31508342
That's worked.. thanks!

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi 2 77
egit plugin on eclipse 8 99
Installshield for Embarcadero EX 10.1 Berlin 4 72
Delphi Firemonkey : user drawing in window 3 24
In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

749 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