Solved

Change Color for Items on TListView

Posted on 2004-04-15
5
283 Views
Last Modified: 2010-07-27
Hi all

I did a simple program, which beeps, and sends a message on a specific date+time. A To-Do list like in Outlook ;)
This is in a listview:
Nr - Date - Time - Text
Now I want to change the color of a single listitem to clRed or clGreen, so you can choose, it's finished or not... I tried so many things but it seems - not enough..

125 Points for now...
Thanks in advance

Regards Phobeus
0
Comment
Question by:Ne000
  • 3
5 Comments
 
LVL 7

Accepted Solution

by:
sftweng earned 125 total points
ID: 10837336
0
 
LVL 7

Expert Comment

by:sftweng
ID: 10837351
0
 
LVL 7

Expert Comment

by:sftweng
ID: 10837387
0
 
LVL 17

Expert Comment

by:mokule
ID: 10837410
procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
  Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
  if Item.Index =1 then
    ListView1.Canvas.Brush.Color := clRed
  else
    ListView1.Canvas.Brush.Color := clGReen;
end;
0
 
LVL 1

Author Comment

by:Ne000
ID: 10837436
Ok, thank you very much :o)
I think, I dindn't search right... I always type google site:experts-exchange.com delphi ...

Full points for you :o)

Sorry, mokule too late :(

Regards Phobeus
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 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

11 Experts available now in Live!

Get 1:1 Help Now