Solved

Change Color for Items on TListView

Posted on 2004-04-15
5
282 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
Comment Utility
0
 
LVL 7

Expert Comment

by:sftweng
Comment Utility
0
 
LVL 7

Expert Comment

by:sftweng
Comment Utility
0
 
LVL 17

Expert Comment

by:mokule
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

16 Experts available now in Live!

Get 1:1 Help Now