Hola.
Creo que tendrías que crear otro arreglo constante con la traducción de los nombres.
Un ejemplo:
Código Delphi
[-]
const
SPACOL: array[0..17] of string = ('Agua','Negro','Azul','Gris oscuro',
'Fucsia','Gris','Verde','Lima','Gris claro','Marrón','Azul marino',
'Verde oliva','Púrpura','Rojo','Plateado','Cerceta','Blanco','Amarillo');
ENGCOL: array[0..17] of TColor = (clAqua, clBlack, clBlue, clDkGray,
clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy,
clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow);
procedure TForm1.FormCreate(Sender: TObject);
var
i: Integer;
begin
with ComboBox1 do
begin
Style:= csOwnerDrawFixed;
for i:= 0 to 17 do AddItem(SPACOL[i], TObject(ENGCOL[i]));
end;
end;
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
with Control as TComboBox do
begin
if odSelected in State then
Canvas.Brush.Color:= clHighlight
else
Canvas.Brush.Color:= clWhite;
Canvas.FillRect(Rect);
Canvas.TextOut(Rect.Left + 24, Rect.Top, SPACOL[Index]);
Canvas.Brush.Color:= TColor(Items.Objects[Index]);
Canvas.Rectangle(Rect.Left + 1, Rect.Top + 1, Rect.Left + 21, Rect.Bottom - 1);
end;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
with TComboBox(Sender) do
if ItemIndex <> -1 then
Panel1.Color:= TColor(Items.Objects[ItemIndex]);
end;
Saludos