Solved

Delphi clock in listview

Posted on 2008-10-21
3
430 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
[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
3 Comments
 
LVL 15

Expert Comment

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

Accepted Solution

by:
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

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
ID: 31508342
That's worked.. thanks!
0

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