Does anyone know how to remove a certain color from the drop-down list of TColorBox?
You need to delete the color in the list:
procedure TForm7.FormCreate(Sender: TObject);
var i: Integer;
begin
i := ColorBox1.Items.IndexOf('clGreen');
if i < > -1 then
ColorBox1.Items.Delete(i)
else
Showmessage('invalid color');
end;
Does anyone know how to delete a certain color from the drop-down list of TColorBox?
You need to delete the color in the list:
procedure TForm7.FormCreate(Sender: TObject);< br />var i: Integer;
begin
i := ColorBox1.Items.IndexOf('clGreen');
if i <> -1 then
ColorBox1.Items. Delete(i)
else
Showmessage('invalid color');
end;