Solved

Change Color for Items on TListView

Posted on 2004-04-15
5
288 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
[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
5 Comments
 
LVL 7

Accepted Solution

by:
sftweng earned 125 total points
ID: 10837336
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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