procedure TFormMainMenu.LVSendCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if Item.SubItems.Strings[8] = '未发送' then
begin
DefaultDraw := True;
LVSend.Canvas.Font.Color := clRed;
LVSend.Canvas.Brush.Color := clYellow;
LVSend.Canvas.FillRect(Item.DisplayRect(drLabel));
LVSend.Canvas.TextOut(Item.DisplayRect(drLabel).Left+2,Item.DisplayRect(drLabel).Top+2,Item.SubItems.Strings[1]);
end;
end;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if Item.SubItems.Strings[8] = '未发送' then
begin
DefaultDraw := True;
LVSend.Canvas.Font.Color := clRed;
LVSend.Canvas.Brush.Color := clYellow;
LVSend.Canvas.FillRect(Item.DisplayRect(drLabel));
LVSend.Canvas.TextOut(Item.DisplayRect(drLabel).Left+2,Item.DisplayRect(drLabel).Top+2,Item.SubItems.Strings[1]);
end;
end;
解决方案 »
- 如何改变label的字体?
- 新手交流贴。给FireBird新手。Oracle可以从dual里Select 资料,FireBird呢?
- 大家帮忙看下这个delphi的 修改语句哪里错了
- 如何在dbgrid中把焦点移到指定列。
- Delphi7的TcpServer和TcpClient的非阻塞方式如何用?
- 临时表的查询
- 请大哥哥帮帮忙!!!谢谢了
- 茫然之网络编程收发邮件~`急急!!
- 如何转化成整形?
- 字符串取值?急
- 有关于combobox的运行时的错误提示的一个问题。。。。。。。。。?
- 我想在edit中输入若干个字符串,以';'作为间隔,通过以下程序分别读取每个串,运行错误:输入每个串位数相同时结果正确,输入各个串长度不同时
procedure TMainForm.ListView1CustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
with Listview1.canvas do
if item.caption='aaa' then
begin
font.color:=clwhite;
font.style:=[fsBold];
end;
end;