Solved

Change Color for Items on TListView

Posted on 2004-04-15
5
284 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

831 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