在它的ondrawitem中写
var
offset: integer
with (Control as Tchecklistbox).Canvas do
begin
FillRect(Rect);
begin
Offset := 16;
case index of
0:brush.color:=clred;
1:brush.color:=clyellow;
//...
end;
TextOutRect(Rect,Rect.Left + Offset, Rect.Top + 2, (Control as TCombobox).Items[Index])
end;
end;
var
offset: integer
with (Control as Tchecklistbox).Canvas do
begin
FillRect(Rect);
begin
Offset := 16;
case index of
0:brush.color:=clred;
1:brush.color:=clyellow;
//...
end;
TextOutRect(Rect,Rect.Left + Offset, Rect.Top + 2, (Control as TCombobox).Items[Index])
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货