procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if ComboBox1.ItemIndex = 0 then
begin
if ComboBox2.Items.IndexOf('JUGOS')= -1 then
ComboBox2.Items.Add('JUGOS');
if ComboBox2.Items.IndexOf('GASEOSAS')= -1 then
ComboBox2.Items.Add('GASEOSAS');
ComboBox2.Items.Delete(ComboBox2.Items.IndexOf('CERVEZA'));
ComboBox2.Items.Delete(ComboBox2.Items.IndexOf('VINO'));
end
else
begin
if ComboBox2.Items.IndexOf('CERVEZA')= -1 then
ComboBox2.Items.Add('CERVEZA');
if ComboBox2.Items.IndexOf('VINO')= -1 then
ComboBox2.Items.Add('VINO');
ComboBox2.Items.Delete(ComboBox2.Items.IndexOf('JUGOS'));
ComboBox2.Items.Delete(ComboBox2.Items.IndexOf('GASEOSAS'));
end;
end;