你是怎么做的? 这样的效果?
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
with TCombobox(Control) do
begin
Canvas.FillRect(rect);
case index mod 3 of
0:
Canvas.Font.Color:=clred;
1:
Canvas.Font.Color:=clblue;
2:
Canvas.Font.Color:=clgreen;
end;
Canvas.TextOut(rect.Left+2,rect.Top+2,Items[index]);
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
i:integer;
begin
for i:=0 to 9 do
ComboBox1.Items.Add('NO.'+inttostr(i));
ComboBox1.Style:=csOwnerDrawFixed;
end;