Solved

Delphi clock in listview

Posted on 2008-10-21
3
423 Views
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?
0
Comment
Question by:alanrogerson2
3 Comments
 
LVL 15

Expert Comment

by:mikelittlewood
Comment Utility
Would this be a different clock for every item in the listview?
0
 
LVL 36

Accepted Solution

by:
Geert Gruwez earned 500 total points
Comment Utility
put a timer on your form which has the ListView

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

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

Author Closing Comment

by:alanrogerson2
Comment Utility
That's worked.. thanks!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
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 use and create new code templates in NetBeans IDE 8.0 for Windows.

762 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

7 Experts available now in Live!

Get 1:1 Help Now