А я бы разукрашиванием решил бы проблему  | Код | procedure TForm1.FormCreate(Sender: TObject); var i: Integer; begin ComboBox1.Clear;
for i := 0 to 9 do ComboBox1.Items.Add('Item #' + IntToStr(i+1)); end;
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); var bIt: Boolean; begin bIt := False; case Index of 1,5: begin ComboBox1.Canvas.Brush.Color := clGray; bIt := True; if odSelected in State then begin ComboBox1.Canvas.Font.Color := clBlack; end; end; else if odSelected in State then begin ComboBox1.Canvas.Font.Color := clRed; ComboBox1.Canvas.Brush.Color := cl3DLight; end else ComboBox1.Canvas.Brush.Color := ComboBox1.Color; end;
ComboBox1.Canvas.FillRect(Rect); if bIt then ComboBox1.Canvas.TextOut(Rect.Left, Rect.Top, ComboBox1.Items.Strings[Index]) else ComboBox1.Canvas.TextOut(Rect.Left+10, Rect.Top, ComboBox1.Items.Strings[Index]) end; |
Добавлено @ 12:49 Ну и естественно обрабатывать ещё последующий выбор Item'а. |