Solved

Change Color for Items on TListView

Posted on 2004-04-15
5
285 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

861 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